Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
SQL queries to change TV show path
#1
I'm running LibreELEC 9.0.2 and for some reason I didn't create a season subdirectory for one of my shows. I know enough SQL to be dangerous and I would like some feedback on what I did.
I stopped Kodi via ssh and then continued with the following queries in sqlite against MyVideos116.db:
sql:
UPDATE path
SET strPath = '/storage/nas/videos/TV/Riviera/Season 01/'
WHERE idPath = 170;

UPDATE episode
SET c18 = REPLACE(c18, '/storage/nas/videos/TV/Riviera/', '/storage/nas/videos/TV/Riviera/Season 01/')
WHERE idShow = 28;
I found the idShow and idPath relations by querying the tvshowlinkpath table and a bunch of other queries.
After doing that I created the subdirectory "Season 01" and moved the video and subtitle files to it and restarted Kodi. It seems to have worked but I have a nagging feeling that I may have overlooked something.

Can I go on and create a "Season 02" subdirectory and start adding episodes or should I restore a backup and start over?
Reply
#2
Create the necessary season folders and move the episodes and their related files accordingly.
Scan for new episodes, and do a Clean Video Library action after that.

That should do it.
Reply

Logout Mark Read Team Forum Stats Members Help
SQL queries to change TV show path0