Kodi Community Forum
Library cleanup not cleaning removed series from database (MariaDB) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Library cleanup not cleaning removed series from database (MariaDB) (/showthread.php?tid=355932)



Library cleanup not cleaning removed series from database (MariaDB) - Zwerver - 2020-07-19

I've removed folders with tv shows from my NAS but these are not removed after a "cleanup library" action. The series are not shown in the Kodi GUI, but they still appear in the database. Using the web interface pages or server API json responses show all entries including the ones that would have been removed.

I haven't found any errors in the Kodi or MariDB logs. I'm using LibeElec (latest with Kodi 18.7 on dedicated media player) with a MariaDB (latest with Docker on home server) for years now without problems.

Did anyone had this problem recently and how was it fixed?


RE: Library cleanup not cleaning removed series from database (MariaDB) - black_eagle - 2020-07-19

You need to remove them from within Kodi's GUI first.  EG, highlight the show/movie/episode to be removed, then get up the context menu ('c' on a keyboard) and choose 'manage'. Then choose 'remove from library'.  Kodi deliberately will not remove missing shows or movies when performing a clean library as if it did, and your NAS happened to be offline for some reason, it would remove all of your stuff.


RE: Library cleanup not cleaning removed series from database (MariaDB) - Zwerver - 2020-07-19

Yes, that is the issue indeed!

I was using a different skin based on the old Confluence skin. That skin, "Χonfluence", did not support managing tv shows and removing them from the library. It only removed the tv show from the list. The default skin and the "Confluence by Jezz-X" work correctly. 

There is still a small inconvenience. After removing one tv show from the library all the "empty" tv shows disappear for a minute. After a minute they are added again. I think this has something to do with Kodi trying to figure out the missing tv show folders that are still in the list (a lot) and my network speed network. So now I grab something to drink and I'm going to manually remove all those finished tv shows from previous years...

Thank you.


RE: Library cleanup not cleaning removed series from database (MariaDB) - Klojum - 2020-07-19

(2020-07-19, 16:53)Zwerver Wrote: After removing one tv show from the library all the "empty" tv shows disappear for a minute. After a minute they are added again.

That's weird. Whenever I remove a TV show or movie via the Kodi GUI, they never re-appear.
Where and how are you media files stored?
Are the files re-appearing in the database only, or were they never deleted from the harddrive in the first place?


RE: Library cleanup not cleaning removed series from database (MariaDB) - Zwerver - 2020-07-19

I do however question the current working of the "clean library" option. What is it still cleaning if not removed entries? A mystery...


RE: Library cleanup not cleaning removed series from database (MariaDB) - Zwerver - 2020-07-19

(2020-07-19, 17:00)Klojum Wrote:
(2020-07-19, 16:53)Zwerver Wrote: After removing one tv show from the library all the "empty" tv shows disappear for a minute. After a minute they are added again.

That's weird. Whenever I remove a TV show or movie via the Kodi GUI, they never re-appear.
Where and how are you media files stored?
Are the files re-appearing in the database only, or were they never deleted from the harddrive in the first place?
No, when I remove a TV Show that doesn't exist anymore it disappears from the TV Shows list.

The TV Shows lists shows all the shows in my library, even those that don't exist on my harddisk (NAS) anymore. Those shows are shown as an "empty" show, they have zero seasons and zero episodes. After I remove one of those non-existing "empty" shows from the library the TV Shows list is reset to show my updated library again. When it does however, any "empy" show is disappeared from the list. When I go back to my "home" view and select "TV Shows" again, the TV Shows list shows all the shows in my library again including those "empty" shows.

This behavior seems to be regardless of interface skin and is probably a small bug.

My problem was that I removed folders with tv shows and used "clean library" to remove them, expecting those tv shows to be removed from the library automatically. Reading back the first reply it seems that this "clean library" function has changed and doesn't do that anymore.


RE: Library cleanup not cleaning removed series from database (MariaDB) - Zwerver - 2020-07-19

&TLDR;

The "clean library" doesn't remove TV Shows anymore if the folder cannot be found (for me)
Manually cleaning up a TV show as mentioned by @black_eagle works but the refreshed TV show list has a small bug not showing TV shows of which the folder cannot be found (workaround: go from "home" back to "tv shows")