(2019-04-13, 18:22)nevernow Wrote: I think this tool is not compatible with the latest developments of Kodi's archive support (moved to an add-on, but there are two distinct add-ons providing RAR support). It wants to delete all my RAR'd movies, which appear in the log as
Code:
archive://%2fvar%2fmedia%2fwarez%2fMovies%2fRELEASENAMEHERE%2fRELEASENAMEHERE.rar/
They are multipar RAR archives, scene standard. It would be great to have this add-on support archives.
Archives have nothing to do with anything (or at least, whilst support was in core they didn't - Guess now they are spun out that things may have changed). However, the addon was originally developed to remove all the crud that is needlessly added to the video database whenever you stream something, be that via netflix, hulu, http(s), rtmp, youtube or whatever. ALL those videos get added to the database even though they are not in your local library and they all get processed when running a library update with the result that the update is much slower than it ought to be, plus the fact that all that history is retained, possibly for years, through different Kodi versions and library migrations. Imagine the time to migrate those 5000 youtube videos you've watched over the past 3 years, plus all the attempting to look-up art, find a synopsis etc etc
The fact that it can change paths in the db and remove specific paths is because we (batterPudding & I) both thought that that was a useful addition. It was NEVER designed to fix video databases that hold invalid information because people haven't correctly removed a video source in Kodi (even though it's possible to force the addon to do this) or to remove entries that appear to be valid local sources. It
should leave untouched anything that it considers 'valid' - ie, it matches with a valid path in your 'sources.xml' or it has been intentionally excluded from cleaning (see below !!)
If the addon wants to delete your RAR'd stuff, then my first thought would be "Are they in valid directories that are listed in sources.xml?". If the answer to that is yes, then you can simply create an 'excludes.xml' with contents of
xml:
<excludes>
<exclude>archive://</exclude>
</excludes>
Please see the 'docs.txt' document for further details, which can be found in the addon's install directory - eg '~/.kodi/addons/script.database.cleaner' for Linux machines, 'Users\[YourUserName]\AppData\Roaming\Kodi\addons\script.database.cleaner' for Win 7/8/10 and 'Users\[YourUserName]\AppData\Local\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\addons\script.database.cleaner' for the Win 10 App Store version or you can read the online version
here.
There are simply so many scenarios and variations because of the flexibility that Kodi offers, that it's impossible to write something that is capable of a 'catch all' situation. The best we can manage is to come up with an addon that follows a set of rules that will (should ?) work in the vast majority of cases, and then build in some flexibility to allow the end user to 'tweak' some stuff according to their needs. It'll never be perfect, it'll probably never meet everyones needs, but whilst Kodi continues to add streaming video to its video.db (whilst not being able to remove it during a 'clean library' run) it's possibly the best solution currently to a problem that really, shouldn't exist.
Latest (Leia compatible) version can be downloaded from
here. V0.6.0 is the Leia version (should work with both MySQL and SQlite databases).