How to mass change show locations if Mass Update wont work

General discussion about Sick Beard or related topics

How to mass change show locations if Mass Update wont work

Postby PenFold » Thu Dec 27, 2012 9:13 pm

Hi all,

I thought this might be of use to someone else so I've posted this up here.

I've recently changed my HTPC over from Windows to Ubuntu, copying my Sick Beard config and DB over from the windows box in to Ubuntu thinking this would save me some time as my library was all sitting on a couple of separate hard drives.

After a few little config niggles, all my shows were visible, but their locations were still pointing to my Windows "E:\TV\" folder, so when trying to post process i got the error "Unable to post-process an episode if the show dir doesn't exist, quitting" and when I tried "Mass Update", it would try to update all the locations to "/mnt/pool/TV/E:\TV\".

After a Quick Google I found out this was caused by Sick Beard not finding the old "E:\TV\" location, so the only option was to manually update each show individually. As this was going to take forever I did a little experimenting and come up with the following solution using SQLite3. you can install it on Ubuntu by running 'sudo apt-get install sqlite3'

Working in the Sick Beard directory (normally ~/.sickbeard/) make sure Sick Beard is not running and run the following:

sqlite3 sickbeard.db
update tv_episodes set location = replace(location, 'old_location', 'new_location');
update tv_episodes set location = replace(location, '\', '/');
update tv_shows set location = replace(location, 'old_location', 'new_location');
update tv_shows set location = replace(location, '\', '/');
.exit

Remember to replace old_location and new_location accordingly.

Restart sick beard and your library should be updated. I've tried post processing a few shows and it all seems to work correctly, show art is missing so you will need to force a full update to get that back. If there is an easier way to do this I would love to hear it.

Hope this helps!
PenFold
 
Posts: 2
Joined: Thu Dec 27, 2012 8:32 pm

Re: How to mass change show locations if Mass Update wont wo

Postby zoggy » Fri Dec 28, 2012 4:02 am

manage > mass update. check off all shows and click 'update'. then update the 'rootDir' that change. save. done.
zoggy
 
Posts: 3763
Joined: Fri Oct 22, 2010 8:32 pm

Re: How to mass change show locations if Mass Update wont wo

Postby PenFold » Fri Dec 28, 2012 10:45 am

Tried that several times and it wouldn't have it, hence the manual intervention.
PenFold
 
Posts: 2
Joined: Thu Dec 27, 2012 8:32 pm

Re: How to mass change show locations if Mass Update wont wo

Postby zoggy » Sat Dec 29, 2012 2:57 am

dunno, ive helped several people in irc do exactly just that without any problems.
zoggy
 
Posts: 3763
Joined: Fri Oct 22, 2010 8:32 pm

Re: How to mass change show locations if Mass Update wont wo

Postby Gregb7677 » Thu May 09, 2013 5:48 am

@Zoggy Thanks, fixed an issue I was having!
Gregb7677
 
Posts: 1
Joined: Thu May 09, 2013 5:35 am

Re: How to mass change show locations if Mass Update wont wo

Postby CyberMew » Wed Dec 25, 2013 3:01 pm

This worked great! Thanks so much! You have to restart the server for it to correctly show up in the ui.
CyberMew
 
Posts: 24
Joined: Sun Sep 23, 2012 2:36 am


Return to General

Who is online

Users browsing this forum: Google [Bot] and 3 guests