[LE 10.0.1, RK3399] Clean Video Library Bug

  • Hello,

    I'm using LE on my RK3399 based SBC called NanoPC-T4. I use another service which creates Metadata for for the library (TV Shows, Movies etc) and it works all good.

    Now the problem I'm having is when I completely delete a TV Show or Movie folder and then do Clean Video Library, the entry is not being removed from the library (episodes are deleted for shows).

    If the corresponding folder is deleted, its entry should be removed up cleaning library, but it doesn't work. Only way to remove the entry is to goto it and do Manage... > Remove from library.

    I'm using "Local information only" and media & metadata is managed by Sonarr which then triggers Library Updates in LE.

    Regards~

    Edit 1: Forgot to mention, I'm using the AuraMOD AIO Skin and have created custom main menu items. If this info is needed.

  • The current cleaning video library routines in Kodi aren't perfect. Not all database tables are scrubbed by the database triggers like they should be. Why is that? It's a good question. Partly because not every Kodi dev can / wants to dive into the database routines. The whole database schema also needs a spring cleaning, but for now "it works". A new schema would involve rewriting Kodi's core routines, and would also affect LOTS of skins and add-ons.

    I'm not a Python/C++ developer myself, but I can cook up a bunch of PHP/MySQL routines, and apparently deleting a single TV show and its episodes from the Kodi GUI directly (which is preferred instead of having to clean up afterwards) can involve up to 18 tables in the video database. The current triggers only do a handful of those. And that doesn't even involve the local cache thumbnail files in the Textures13 database.

    What you can try is running the Video Database Cleaner add-on. It has been updated for Kodi 19+ use and should do a better job than the current internal routines.