(2019-11-11, 10:18)black_eagle Wrote: that doesn't take into account any removable storage that may be disconnected at the time or an offline NAS.
Yeah, I fathomed that when re-reading BP's post. Doh!
I was thinking whether it's possible to do a sources detect first then build that as an exclusion list (NAS offline), but ultimately it comes down to leaving the records intact when people want them removed versus scrubbing them in the absence of remote paths (which aren't always easily detectable) and having the overhead of rebuilding all of the entries when the remote storage becomes available.
No matter which choice is picked, it won't suit everyone, so I feel it's wasted developer effort implementing a process that doesn't ahev a strnog justification behind it.
(2019-11-11, 10:18)black_eagle Wrote: Kodi already checks for the existence of files when it does a clean library
The problem I encountered was the files (and directory) being removed but the series still presented itself as a thumbnail in the library which "clean library" didn't clear out. I fixed it through manually scrubbing some entries (using sqllite3 - possibly broken referential integrity - not sure if there's any PK/FK constraints between series and episodes)
It wasn't a problem having a series show up with no episodes - those entries were cleaned as expected - just that I wanted those series themselves being hidden. (is there an option for that? I didn't look)
(2019-11-11, 10:18)black_eagle Wrote: If people remove sources correctly from inside Kodi, then it does a pretty good job of cleaning that up but if you just delete stuff on disk without doing that, then your db can end up in a mess eventually.
Yeah, I've done the latter as it was quicker to scrub stuff through the command line than do it piecemeal through Kodi. If there's a way of bulk-scrubbing through Kodi, I'll take that.
Anyhow, this is largely academic. I think we agree a dirty DB doesn't indicate a dirty library; RDBMS are pretty efficient at manipulating records and there are ways and means of achieving the desired outcome without needing Kodi to explicitly have this feature.
All good!