Moving collection/config
-
Hello,
I'd like to move my setting and collection folder to another user account and have trouble to do that without losing collection information like ratings.
What I tried to do:
- copy all files in
/home/olduser/Music
to/home/newuser/Music
- copy
.local/share/strawberry
,.config/strawberry
and.cache/strawberry
to the corresponding folders of the new user
As the music folder collection path is basically changing, strawberry re-scans another folder and thus seems to ignore the previously collected ratings. I do not like to store the information in song tags. Is there any idea how I can move my collection without losing information?
Does strawberry accept relative paths? Maybe this would help me...
I am using ArchLinux on one and Fedora 34 on the other machine, both using version 1.x.
Thanks in advance for any help!
- copy all files in
-
Yes, you can move your music, or copy it.
First, you should copy the library:cp -R /home/olduser/Music /home/newuser/Music
Then look for the database. This is saved in .local/share/strawberry/strawberry/strawberry.db.
This is a SQLite database. You can use "DB Browser for SQLite" to such files or the shell ith sqlite3 command, but its easier with the editor.In the db there is a table "songs". In this table, the column 'url' saves the path to your music file and the column 'rating' holds the ratings for the song. You can use standard SQL syntax to edit the fields. You have to edit the path to the new path. Be careful to identify the correct song, since there is no unique id linked to the song.
For example you can get a list with the following syntax (in tab "execute SQL"):
SELECT title, album, artist, track, disc, url, rating FROM songs;
Save the result as CSV file. Open the CSV file with Libre Office Calc (or any other calculation software, like Excel).
Add a new column in the csv file and enter the following formula (Keep the Quotes):
=CONCAT("UPDATE songs SET url = '";F2;"' WHERE title = '";A2;"' AND album = '";B2;"' AND artist = '";C2;"' AND track = ";D2;" AND disc = ";E2;";")
Use autofill for all the other entries. This creates a new set of SQL commands in this new column to UPDATE the mentioned table.
Copy the database to the new location, DON'T open strawberry. Open the database on the new location with the SQLite editor. Paste new created SQL commands in the execute tab and execute the commands. Save the database/write the changed entries. Close the SQLite editor.
Open Strawberry on the new profile, ratings and path should now be edited. To be save, you can create backups of the database files.
Sounds complicated, but it should work. I have migrated my Media Monkey data from Windows by a similar way, and it worked like a charm.
UPDATE: Sorry forgot that the path/url changes, during this operation. In this case, you can search and replace in the textfile, to change the parts of the path, which changes.
-
maybe its much easier in your case. after thinking again, you should also be succesfull by using a update sql like this:
update songs set url = 'newpath' where url = 'oldpath';
in the new column within libre office. set the fieldnames according to your current table. ratings are already set in your case, you have only to update the path.
-
Hi @techge,
Quite old question, but I have to move my collection recently. It seems OriNOVet missed some data and tables to edit (may be new in last strawberry versions).So, using only SQL request , you can use :
UPDATE table SET mycolumn = REPLACE(mycolumn,'oldpath_substring','newpath_substring') WHERE mycolumn like '%oldpath_substring%';
I hope this is a complete data update :
UPDATE songs SET url = REPLACE(url, 'oldpath_substring','newpath_substring') WHERE url like '%oldpath_substring%'; UPDATE songs SET art_automatic = REPLACE(art_automatic,'oldpath_substring','newpath_substring') WHERE art_automatic like '%oldpath_substring%'; UPDATE songs SET art_manual = REPLACE(art_manual, 'oldpath_substring','newpath_substring') WHERE art_manual like '%oldpath_substring%'; UPDATE songs SET cue_path = REPLACE(cue_path, 'oldpath_substring','newpath_substring') WHERE cue_path like '%oldpath_substring%'; UPDATE subdirectories SET path = REPLACE(path,'oldpath_substring','newpath_substring') WHERE path like '%oldpath_substring%' ; UPDATE directories SET path = REPLACE(path,'oldpath_substring','newpath_substring') WHERE path like '%oldpath_substring%' ;
Edit :
Before editing the database, may be disable "auto update library at startup" and "monitor library modification" in paramaters menu.visitor