Page 1 of 1

Moving all music to new disk/s!

PostPosted: Tue Nov 13, 2007 1:27 pm
by PeeGee
Hi Sindre,

I know you and I talked about this before, but I thought it was worth bringing up again.

I recently had to move my whole musiccollection to a bigger disc, since the old one became to small. The sad part about this is that features like "Most frequently played" or "Most recently played" are now blank, there is no information/stats left.

Is there a way to fix this, or do I have to live with the fact of losing this information everytime I need to move the music?

Thanks / Patrik

PostPosted: Tue Nov 13, 2007 2:28 pm
by sindre_mehus
Hi Patrik,

There is a way around it :-) In Subsonic 3.2 I added an undocumented database query page where you can run SQL statements.

Please take a backup of the subsonic directory before doing this!
Log in as admin and go to http://localhost/subsonic/db.view

To look at the music_file_info table, run this query:

Code: Select all
select * from music_file_info


Then you must do some SQL string manipulation to change the paths. For instance, if the location has changed from f: to g:, you would have to do the following update:

Code: Select all
update music_file_info
set path = concat('g', substr(path, 2))
where path like 'f:%'


Good luck!
Sindre

PostPosted: Tue Nov 13, 2007 3:22 pm
by PeeGee
Wow Sindre, SQL-possibility sounds great! :D

I will try this later, thanks Sindre!

/ Patrik