Chad Don Cooper Projects and ponderings…

22Jun/170

Sickrage – Update SQL database when files move

I currently have all my ripped TV shows spread across several drives in Windows. I use Sickrage to maintain an index of them as it produces media information which can be used by Kodi. Rather than using RAID, I have chosen to split the volumes by first letter of each show. I do this as I'd rather try recovery on a single NTFS drive/partition and I'm not in the mood to go ZFS anytime soon.
This does mean I sometimes have to shuffle around data between the drives which makes Sickrage and Kodi unhappy. Rather than go through updating paths manually however I tend to run the following scripts using SQLiteSpy after taking a backup of the db file.

Can view shows 0-9 and A-G using:
select * from tv_shows where show_name glob '[1-9A-Ga-g]*' order by show_name asc

You can move shows H-S from T:\ to U:\ with:
UPDATE tv_shows SET location = 'U:\' || SUBSTR(location,4) WHERE show_name GLOB '[H-Sh-s]*'

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.