Sorry if this is a duplicate; I’ve been searching and haven’t found what I’m looking for so far.
I have multiple OSMC Vero boxes, and have successfully started using a MariaDB server to use a shared MySQL database from all my OSMC Vero boxes, and I could not be happier!
I have one box that is going to be leaving my home soon, and I wish to keep providing my loved one access to the media they’re used to here at home. The shared MySQL database over a VPN ends up being slow to start and update, so I’ve been kicking around having a way to have a scripted solution that does the following:
Take a dump of the current shared MySQL(MariaDB) database, convert that to the SQLite3 format, and then run another script against the new local copy that clears any watched data as well as resume points on any movies/episodes.
I have successfully used mysql2sqlite pip script to almost satisfy the dump & convert portion:
mysql2sqlite -f /mnt/TMPworking/$sqlite3_dbname -h $mysql_host -P 3306 -d $mysql_dbname -u $mysql_user --mysql-password $mysql_password -V --use-buffered-cursors
It looks great overall (All media and corrections from initial scrapes are there), but I am unable to mark anything as watched, nor track current resume points for movies/episodes. So my guess is with a couple of tweaks to my method I could have this portion working (currently this takes ~30min to complete).
As far as the watched data clearing, in a database that allows me to manually set/unset per file via GUI, I have been successful in using the following script to clear all watched states:
kodi-send --action=“CleanLibrary(video)”
sleep 60
kodi-send --action=“UpdateLibrary(video)”
However, I can’t seem to find a way to also clear any resume info for movies/episodes in-progress.
I have also tried using the Export/Import method, Exporting from a OSMC Kodi box with Export Library (of the MySQL shared library), then starting with a blank local database, letting Kodi start, and then doing an import (settings>Media>Library>Import library). This has been running (and crashing) for over 12 hours now, where after each crash I must manually restart.
I would really like to see my dump/convert option realized, as it is so much faster & would allow for an easy backup of the MySQL shared db that can be fallen back to if the MySQL server dies or has some other mishap.
Any help is appreciated. Thank you.