Comments and ratings lost if folder is moved?

Need help? Post your questions here.

Moderator: moderators

Comments and ratings lost if folder is moved?

Postby recked » Tue Dec 22, 2009 8:55 pm

Is there any way to retain the comments and ratings when moving a folder?

I've spent a lot of time inputting biographical info and album reviews, but if I ever need to re-organize folder locations, all that data disappears!

I was relieved to find that moving the folder back to its original location did restore the comments and ratings. But is there any way to move folders without losing data?

Also, is there any other data that may be affected by folder moves? Where/how does Subsonic store this info, if I might ask?

Oh, and thanks for creating simply the *best* shared media library in human history.
recked
 
Posts: 13
Joined: Tue Dec 22, 2009 8:48 pm

comments + ratings lost if folder moved?

Postby recked » Thu Dec 31, 2009 7:06 pm

Not to be impatient but I thought I'd bump this back into view as it's kind of critical. I have artists taking time to post info using the comments section as soon as they upload their work.

Is there any way I can avoid losing that info when I move the folder out of Incoming? Where is this data stored?
recked
 
Posts: 13
Joined: Tue Dec 22, 2009 8:48 pm

little help?

Postby recked » Fri Jan 15, 2010 7:14 pm

Even if it's to confirm that there's no workaround, any chance I could get a "boo" from a moderator on this thread?

I'm spending lots of time copying and pasting comments whenever I move an upload from Incoming to the alphabetized directory. Is this my best/only remedy?
recked
 
Posts: 13
Joined: Tue Dec 22, 2009 8:48 pm

Postby steez » Tue Mar 15, 2011 12:06 am

I would like to know this information as well. Comments are useless if you loose the info after you move a folder.

They must be stored in the DB somewhere? Anyone know where?
steez
 
Posts: 24
Joined: Tue Jan 25, 2011 5:44 pm

Postby Skidd » Tue Mar 15, 2011 4:22 pm

I'm not a subsonic mod or developer, but I am a coder.
This "should" help, but it'll require some manual intervention on your part!!

Download and install this little database viewing utility
http://sourceforge.net/projects/jdbview/
(Yes, I wrote it a long time ago :P )

copy the file
hsqldb-1.8.0.7.jar
from /var/subsonic/jetty/2169/webapp/WEB-INF/lib
Into the folder you installed JDBView

Shutdown Subsonic!
And MAKE A COPY OF THE DIRECTORY
/var/subsonic/db
I repeat COPY THIS DIRECTORY SOMEWHERE!!
It's the Database files. If you mess up, at least you can restore the DB back to how it was.

Launch the JDBView application.
Code: Select all
java -jar JDBView.jar

Or, in windows, you can double click the JDBView.jar file.

Select Menu Item
Database - Connect

Click the "HSQL-DB-File" node

On the right side, leave username and password as they are.
Enter the full path to the database in the "Directory" field
/var/subsonic/db

Enter the Database name
"subsonic"
in the "Database" field.

Click "Connect"

You "hopefully" just opened the database files.
You'll know, because you see a bunch of tabs labeled
sql1, sql2, sql3... etc.
If it failed, you'll see an error message in the "Output Log" tab.
Remember, we're not connecting to a DB Server, but rather opening the small database files up directly.

Now, the fun part, executing some SQL to fix your comment/rating issue.

To see a list of all your music file info enter this into the "sql1" tab and hit "Excecute"

Code: Select all
select * from MUSIC_FILE_INFO


You'll see a long list of all your known music info, including comments and ratings.

Now, depending on your needs, you'll need to run some sql UPDATE commands to fix the changes you've made in your folder structure.

I can help with the commands you'd need, but I'll need to know more about what changes. Did you move ALL your music to a new root location? Or just a couple of artists? If you manage to execute the above query to list all your music files, the "id" and "path" values are the important columns.


When you are done, start subsonic back up.

Shane.
Skidd
 
Posts: 15
Joined: Wed Mar 09, 2011 10:07 pm

Postby bushman4 » Tue Mar 15, 2011 5:56 pm

Even easier...

Go to http://YourSubsonicAddress/db.view

You can perform SQL commands right there.

If you move one folder, the command can be as simple as

Code: Select all
Update Music_File_Info set Path='New Full Path' where path='Old Full Path'


But as Skidd said, if it's not that simple (ie, you moved your whole store or something) then we'd need more info to write the appropriate command.

HTH,
Glenn Sullivan
Subsonic 6.1.6 (Unraid Docker)
90 regular Subsonic Users

Library as of 2024-10-28:
4,527 artists
19,996 albums
282,151 songs
10201.40 GB
41,583 hours
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA

Postby Skidd » Tue Mar 15, 2011 6:27 pm

Beautie!
I didn't even know about that db.view!!
That saves a LOT of extra steps!
Skidd
 
Posts: 15
Joined: Wed Mar 09, 2011 10:07 pm

Postby 3R3 » Tue Mar 15, 2011 7:21 pm

thx bushman4! this little db.view is quite undocumented, or the SS DB is. Anyway, this makes recovering lost info so much easier.
User avatar
3R3
 
Posts: 332
Joined: Mon May 04, 2009 2:09 pm
Location: Germany

Postby steez » Wed Mar 16, 2011 2:47 pm

Thanks! I appreciate the responses.
steez
 
Posts: 24
Joined: Tue Jan 25, 2011 5:44 pm

Postby bushman4 » Wed Mar 16, 2011 3:11 pm

Stolen from another post:

Below are the tables I am aware of:
custom_avatar
internet_radio
music_file_info
Music_folder
Player
Player_transcoding
podcast_channel
podcast_episode
role
system_avatar
transcoding
user
user_rating
user_role
user_settings
version


Also info in the wiki:
https://sourceforge.net/apps/mediawiki/ ... e=Database

HTH,
Glenn Sullivan
Subsonic 6.1.6 (Unraid Docker)
90 regular Subsonic Users

Library as of 2024-10-28:
4,527 artists
19,996 albums
282,151 songs
10201.40 GB
41,583 hours
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA


Return to Help

Who is online

Users browsing this forum: No registered users and 13 guests