Kodi Community Forum
TVShow CleanUp - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Video Support (https://forum.kodi.tv/forumdisplay.php?fid=264)
+--- Thread: TVShow CleanUp (/showthread.php?tid=347116)



TVShow CleanUp - cmakfr - 2019-09-09

When I delete a TV Show (ie All Files & Folders related to the TV Show) and run a database CleanUp,
The TV Show remains in the Library as Empty TVShow

When skin is setup for displaying empty tvShow, i see deleted ones.
When i look in the database with a sqlite browser, i can see that all deleted tvShows remain in Library.

Please fix it
or
Give a sqlite statement to make a real clean


RE: TVShow CleanUp - Klojum - 2019-09-09

(2019-09-09, 12:53)cmakfr Wrote: or Give a sqlite statement to make a real clean

This should do it, change the tvshowname accordingly.
sql:
DELETE FROM tvshow WHERE c00 = 'tvshowname'



RE: TVShow CleanUp - Karellen - 2019-09-09

or just highlight the row and press Delete


RE: TVShow CleanUp - cmakfr - 2019-09-09

Sorry but deleting some rows in the tvshow table wont be enough.
There are a lot of references to an episode in the library database (files, paths, season, rating, views, bookmark, and more...)

Was wondering that someone already have done the job...


RE: TVShow CleanUp - beeswax - 2019-09-10

(2019-09-09, 17:10)cmakfr Wrote: There are a lot of references to an episode in the library database (files, paths, season, rating, views, bookmark, and more...)
Yes, but how many of them does a Kodi skin with this setting enabled actually look at?  You should try Klojum's suggestion before writing it off.  I'd be surprised if the code for "Show empty shows" bothered to dig much deeper that the main tvshow table.


RE: TVShow CleanUp - Klojum - 2019-09-10

(2019-09-09, 17:10)cmakfr Wrote: There are a lot of references to an episode in the library database (files, paths, season, rating, views, bookmark, and more...)
You are correct in that more database tables are filled with referenced data to a TV show.
Sadly, garbage collection inside Kodi is not 100% at the moment, and not all data of a TV show is being removed when you delete an episode or a full TV show.
It seems it would be a relatively easy task to do, but at this time, it has not been implemented yet.
Since I'm not a programmer myself, I can only hope that one the dev team will take this boulder on his shoulder.


RE: TVShow CleanUp - DarrenHill - 2019-09-10

And in the meantime this is why there are a few database clean-up addons listed in the addons section here (mainly the program addons one iirc).

But you won't find them in the official repo, as they have to connect to the database directly and addons which do that are not allowed in the official repo.


RE: TVShow CleanUp - cmakfr - 2019-11-11

Deleting a line from tvshow table did some trick :

1. delete record(s) of the obsolete TvShow(s) in the tvshow table
2. run a 'Library Cleanup'
3. No more obsolete TvShow in GUI

(Im working on a SQLite query that will remove records in the tvshow table for which no related video file is found, in case of success, ill post it there)


RE: TVShow CleanUp - Karellen - 2019-11-11

Why did you go to all that effort when in the TV Show listing you could just press Delete from a keyboard or from the Context Menu if using a remote control?