Kodi Community Forum
Remove empty watched tv shows - 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: Remove empty watched tv shows (/showthread.php?tid=355738)



Remove empty watched tv shows - Calzor Suzay - 2020-07-08

So this https://forum.kodi.tv/showthread.php?tid=315851 is still a problem and I can't keep wiping out the .db file and re scanning everything back in.

Basically I can delete all the files and the folder containing a TV show from my storage.
Go into Kodi and perform a library video clean.
It'll remove the episodes but not the listing for the show itself.

So when you go to Kodi via the web page I still a TV show with 0 episodes.
How I do clean it up without wiping the database every time?

For films it seems to work fine.


RE: Remove empty watched tv shows - Klojum - 2020-07-08

(2020-07-08, 16:20)Calzor Suzay Wrote: It'll remove the episodes but not the listing for the show itself.

Try (again) deleting a TV show via the Kodi GUI, and delete the files subsequently.
Double-check via the file manager of your server OS if the files are really gone.

If the files are still there, then you have a user rights problem or a user problem on your file server.


RE: Remove empty watched tv shows - Hitcher - 2020-07-08

As said, you need to delete the show using the context menu otherwise Kodi keeps it in the DB because there could be more episodes added in the future.


RE: Remove empty watched tv shows - Calzor Suzay - 2020-07-08

(2020-07-08, 16:28)Klojum Wrote:
(2020-07-08, 16:20)Calzor Suzay Wrote: It'll remove the episodes but not the listing for the show itself.

Try (again) deleting a TV show via the Kodi GUI, and delete the files subsequently.
Double-check via the file manager of your server OS if the files are really gone.

If the files are still there, then you have a user rights problem or a user problem on your file server.
When I go into the Kodi GUi the show doesn't appear for me to delete it so I can't.

If I browse to the Kodi web page running on the Raspberry Pi I can see the TV show there with 0 episodes, via my remote app I can see the tv show listed with 0 episodes.
It's not a caching thing either as tried on a new phone, incognito and inprivate on different browsers as well.

The folder and files do not exist on the NAS where the tv shows are held either.


RE: Remove empty watched tv shows - Calzor Suzay - 2020-07-08

(2020-07-08, 16:52)Hitcher Wrote: As said, you need to delete the show using the context menu otherwise Kodi keeps it in the DB because there could be more episodes added in the future.

Do I need to add a show back, delete it via the GUI then remove the files then?


RE: Remove empty watched tv shows - Calzor Suzay - 2020-07-08

Ok this does work but a little clunky.

I re created a folder, created a fake file and scanned to find a new episode.
Then inside kodi I 'removed it' from the library.
Then went to my NAS and deleted the folder along with contents and now I can't see it.

Can we not just set it so if the file and folder no longer exist remove it from the library...?


RE: Remove empty watched tv shows - Karellen - 2020-07-09

(2020-07-08, 23:24)Calzor Suzay Wrote: When I go into the Kodi GUi the show doesn't appear for me to delete it so I can't.
First enable setting 3.6- Show empty TV shows here... https://kodi.wiki/view/Settings/Media/Videos


RE: Remove empty watched tv shows - bossanova808 - 2022-12-22

Is there any non GUI way to completely remove empty TV shows?  Kodi hanging on to things I have long since nuked just in case more might come along later is...irritating.

I suppose I could write an addon to look for them but it seems overkill really - if a show re-appears later, Kodi should just add it back then.  I presume the idea is to not lose watched history, but there's better solutions to that (Trakt etc) than Kodi forever hanging on to stubs of everything you've ever watched...


RE: Remove empty watched tv shows - Klojum - 2022-12-22

(2022-12-22, 04:28)bossanova808 Wrote: I presume the idea is to not lose watched history, but there's better solutions to that (Trakt etc) than Kodi forever hanging on to stubs of everything you've ever watched...

So your problem/challenge is that you want to keep your watched history even when the videos' folders/files are gone?


RE: Remove empty watched tv shows - bossanova808 - 2022-12-22

No - I have my watched history backed up in Trakt, so I don't need Kodi to do that (talking about shows where there are no episodes anymore)...what I want is for shows that are absent on disk to become absent in Kodi.

As in - when I remove a movie, Kodi doesn't hang on to it, right?  I don't really see why TV shows should be different.  I know you can 'hide empty shows' but it just bugs me that if I neglect to set that, e.g. on a new client, suddenly I have like 100+ entries of shows going back years and years I have long since lost interest in.

It's really not a big deal, at all, it'd just it would be nice if a more thorough clean were possible...


RE: Remove empty watched tv shows - Hitcher - 2022-12-22

Make sure all the TV folders are removed, export your library to separate files, delete the video database, rescan to your library making sure you have added <importwatchedstate>true</importwatchedstate> to your advancedsetting.xml. In future remove the show from the library using the context menu when you're done with it.


RE: Remove empty watched tv shows - pkscout - 2022-12-23

Depending on how many shows you have that are orphaned like that, you can:
  1. add folders back for those shows
  2. rescan (which might not be strictly necessary)
  3. turn off the option in the settings to show empty TV shows
  4. go to your TV show library area and remove each using the MANAGE option in the context menu
  5. repeat set 3 but in reverse
Honestly, for a large enough number of orphaned shows, an addon might be easier.  ¯\_(ツ)_/¯ 

I wish clean library would delete the TV show entry when the folder is gone, but it doesn't from what I can tell.