Introduction and context (skip this one if you just want to read my question):
I had an old Alpha version of OSMC installed on my Raspberry Pi, since this was a very old one, I decided to make the upgrade. Yesterday I mad a backup of the userdata (with the OSMC Backup solution and with an add-on xbmcbackup) and installed the newest OSMC from scratch.
After importing the Backup, only the add-ons seems to work, everything else seems to be broken (connection to my NAS, watched movies, configurations, …). I don’t mind starting from the beginning again, might be also the better solution.
The most important thing I wanted to backup are the “watched movies” (and TV series), since I always hide them on Kodi. Once every while I move those movies from the shared folder on my NAS to a not shared one, so when I need more space on the NAS I just delete what is watched. That’s why it would be nice to just know which movies are watched so that I can move them.
Now to the question:
Is there a way to make a list (SQL, text, excel, …) of all my watched movies from a backup’ed userdata folder?
I found a way, here the steps if someone has the same question in the future:
Download SQLite Manager Add-on for Firefox:
Open the DB File of Kodi with the SQLite Add-on:
Open the Database file from \userdata\Database\MyVideosXX.db
In the Execute SQL Tab paste this SQL command, this will show you all the movies with a Play Cound of greater than 0: select movie.c00, files.playCount from movie join files on files.idFile=movie.idFile where files.playCount > 0
To just move the movies, just select the path of the watched movies and then use this for example in robocopy or other tool for moving files: select movie.c22 from movie join files on files.idFile=movie.idFile where files.playCount > 0