How do you move a folder (album) and retain the play count?

Need help? Post your questions here.

Moderator: moderators

How do you move a folder (album) and retain the play count?

Postby wesssider » Wed Sep 14, 2011 6:46 pm

How do you move a folder (album) and retain the play count?
User avatar
wesssider
 
Posts: 46
Joined: Thu Aug 05, 2010 2:32 pm

Re: How do you move a folder (album) and retain the play cou

Postby bushman4 » Thu Sep 15, 2011 11:57 am

This would require a little bit of manual database manipulation.

Go to the db.view page, which is located at http://ip.address:port/contextpath/db.view

To see a list of all Music File Info, use this command:
Code: Select all
select * from music_file_info


To update the stats for a "moved" folder, use this command:
Code: Select all
update music_file_info set path="\\New\Full\Path" where path="\\Old\Full\Path"


Hope this helps,

Glenn
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

Re: How do you move a folder (album) and retain the play cou

Postby BKKKPewsey » Fri Sep 23, 2011 2:11 pm

Note (for me at least on Windoze) I had to be logged in with the admin account to SS 1st.
else you get an Access Denied message
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom

Re: How do you move a folder (album) and retain the play cou

Postby wesssider » Wed Sep 28, 2011 12:43 am

This command works: select * from music_file_info

When I use this command: update music_file_info set path="C:\\New\Full\Path" where path="C:\Old\Full\Path"

I get this message below:

Error
Column not found: C:\Old\Full\Path
User avatar
wesssider
 
Posts: 46
Joined: Thu Aug 05, 2010 2:32 pm

Re: How do you move a folder (album) and retain the play cou

Postby bushman4 » Wed Sep 28, 2011 1:40 am

Those were just examples. Replace the "\\old path" with whatever the path of the folder used to be and the "\\new path" with the new folder path.

Maybe you should give more info about where you are moving files from and to and I'll help you write the correct command.

Glenn
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

Re: How do you move a folder (album) and retain the play cou

Postby wesssider » Wed Sep 28, 2011 3:06 am

I appreciate your assistance and I understand those were examples. It seems pretty straight forward. I'm simply moving the folder one level deeper into my 'archive' folder. I tried several different folders.
User avatar
wesssider
 
Posts: 46
Joined: Thu Aug 05, 2010 2:32 pm

Re: How do you move a folder (album) and retain the play cou

Postby DimaH » Wed Sep 28, 2011 2:52 pm

update music_file_info set path=replace(path,'C:\Old\Full\Path', 'C:\New\Full\Path')
DimaH
 
Posts: 14
Joined: Thu May 14, 2009 4:35 am

Re: How do you move a folder (album) and retain the play cou

Postby wesssider » Mon Oct 03, 2011 1:23 am

DimaH wrote:update music_file_info set path=replace(path,'C:\Old\Full\Path', 'C:\New\Full\Path')


Success! Thank you.
User avatar
wesssider
 
Posts: 46
Joined: Thu Aug 05, 2010 2:32 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 6 guests