Example: you have 2 tv show folders and you want to merge them.
Ex: you have 10 tv shows here /VD/TvShows and 3 tv shows here /VD/TvShows1. you would like to move them all to /VD/TvShows (assuming no conflicts), so that in the end /VD/TvShows has 13 tv shows.

Format of the sqlite search and replace command:

Sidenote: another method you might be thinking of is to get the SQL ascii text from the sickrage.db file and use sed (search and replace) to replace all occurrences of /VD/TvShows1 with /VD/TvShows & then use that new SQL ascii to make a new sickrage.db, THIS WILL NOT WORK  sqlite sickrage.db .dump > tmp.sql; sed -i tmp.sql 's|/VD/TvShows1|/VD/TvShows1/g'; sqlite sickrage1.db < tmp.sql; cp sickrage.db sickrage.db-backup; cp sickrage1.db sickrage.db; this method will NOT WORK and sickrage will not launch afterwards (even though the database is totally fine – well it seems totally fine, but other aspects/properties of it are lost & when you launch sickrage it will complain things are missing like encryption or something. whatever. just use the steps below). HOWEVER METHOD BELOW WORKED.

STEPS

step 1. close out of sickrage

step 2. make a backup of your sickrage setup and your videos

step 3. move the TvShows

ex:

step 4. optional make backup of sickrage db. make another quick backup just in case (its redundant with step2, but depending on how you did step2, this might be faster to reach if you mess up)

cp sickrage.db sickrage-backup.db

step 5. load up sickrage

step 6: update tv_shows

details: located all of the locations columns in tv_shows tables that have /VD/TvShows1 somewhere in the value (update tv_shows … location like ‘%/VD/TvShows1%’; The % allow the value /VD/TvShows1 to be somewhere in the value. We could remove the first % because the strings starts with /VD/TvShows1, but we dont as its optional & this way example can apply to more people) and set the value of the location column to whatever the value of location is if you were to replace any occurance of /VD/TvShows1 anywhere in the string with /VD/TvShows.

step 7: update tv_episodes

Note: the other tables dont have “location” or any paths.

Note: also other .db files like cache.db and failed.db and cache/rss/*db dont have anything related to the location of tv_shows and episodes (at least they didnt on the latest version on 2016-04-28)

step 8: you may also need to change your config.ini or from General Config -> Show Root Directories

Leave a Reply

Your email address will not be published. Required fields are marked *