2019-04-15, 07:52
(2019-04-14, 22:01)shortywz Wrote: I apologize if this has been asked before, but I couldn't find anything.As i've understood, the original intent of this database pre wash scrub was to remove the hundreds of streaming entries stored wihin the DB which caused the kodi database clean function to choke and seemingly hang.
I'm trying to clean up invalid entries that have somehow crept into the 'episode' table - I have rows here for files which have since been deleted, but no combination of this tool nor the traditional clean/update are removing them. Subsequently, my "total/viewed" counts are skewed in the show overview page of Kodi.
Any thoughts on the best method to clean this table out?
So, if you are not having an issue with the database clean function choking, you really don't have an issue with such fragments.
IIRC, these invalid fragments within your database tables are simply dead entries so to speak and occur when one does not remove movies or episodes via kodi itself.
These dead entries should pose no issue as such but i do like a clean database as it satisfies my OCD.
One of the simplest ways to get a clean database is to export your library as separate files (including actor thumbnails and such otehr bits it askes for during the export).
This does result in .nfo, jpg and other metadata files being stored alongside your media files which some don't like.
Also, if you want to preserve your watched state, you need an appropriate entry in the advansedsettings.xml file to force import of watch state from the nfo's.
Once the export is done, simply redefine your sources and then scan for new media at which point all your local media is imported using the local metadata saved during the export process.
At this point you have a clean database without reminants or other such fragments.
The benefit of doing this periodic export is that it makes recovery from database corruption rather simple as all your metadata is stored locally.
If this seems like too much, i believe that you can use database.cleaner to remove these entries but i've not looked into it myself as i prefer the export as a backup so to say.