TVShow CleanUp
#1
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
Reply
#2
(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'
Reply
#3
or just highlight the row and press Delete
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#4
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...
Reply
#5
(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.
Reply
#6
(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.
Reply
#7
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.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#8
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)
Reply
#9
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?
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply

Logout Mark Read Team Forum Stats Members Help
TVShow CleanUp0