Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanonupdate does not work completely for tv shows #25137

Open
4 tasks
pipsen opened this issue May 5, 2024 · 6 comments
Open
4 tasks

cleanonupdate does not work completely for tv shows #25137

pipsen opened this issue May 5, 2024 · 6 comments
Labels
Component: Database Triage: Confirmed issue has been reproduced by a team member v21 Omega

Comments

@pipsen
Copy link

pipsen commented May 5, 2024

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

Setup:

  • KODI Omega 21 Release (but this issue is in place for years)
  • advancedsettings: cleanonupdate=true

Expected Behavior

Here is a clear and concise description of what was expected to happen:

For Movies: When the scraped movie file or whole movie folder is removed from source / NAS, the movie is automatically removed from MyVideos131 Database and consequently not visible any more in the KODI GUI => works as expected

For TVShows: When all TV Show episode files or the whole folder is removed from source / NAS, the TVShow and all episodes shall be automatically removed from MyVideos131 Database and consequently not visible any more in the KODI GUI => does not work

Actual Behavior

All episodes are removed from the database and GUI, but the main TV Show is still in place. Observations:

  • TVShow can still be listed in "tvshow_show" view in the MyVideos131 database file
  • Cover and TV show description is still visible in the KODI GUI. When entering the tvshow, no seasons or episodes are listed

Possible Fix

Workaround: Manually enter the context menu of the TV show in GUI -> Manage -> Remove from library

To Reproduce

Steps to reproduce the behavior:

  1. Take any KODI version you like
  2. Enable "cleanonupdate" at advanced settings or trigger cleanup library manually
  3. Add a certain Tv show to Source folder
  4. Initiate scraping the tv show => TV Show is part of Library / Database
  5. Delete the TV Show from file system / NAS
  6. Initiate cleanup library (no matter via automatism or manually)
  7. Check TV Shows -> Empty TV Show with cover is listed
  8. Check MyVideos131 database file => TV Show is still in place

Debuglog

The debuglog can be found here:
Debug Log of first scraping:
kodi1_scraping.log

Debug Log of KODI start after tvshow has been removed from file system:
kodi2_deleting.log

MyVideos131 Database file after step 2:
MyVideos131.db.zip

Screenshots

Here are some links or screenshots to help explain the problem:

n/A

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

n/A

Your Environment

Used Operating system:

  • [ X ] Android

  • iOS

  • tvOS

  • [ X ] Linux

  • [ X ] macOS

  • Windows

  • Windows UWP

  • Operating system version/name: Tested with LibreELEC, MacOS and Android on NVIDIA Shield

  • Kodi version: 21.0 Omega (but in place for years)

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

@xbmc-gh-bot xbmc-gh-bot bot added the Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it label May 5, 2024
@wutschel
Copy link

wutschel commented May 5, 2024

I also was just recently surprised to recognize that Kodi shows "empty" TV shows. But this somehow seems to be conceptual. You can for example also create an empty folder named after a TV show and do scan. The TV show will show up, but w/o any episodes. As a workaround you can disable Kodi's setting "Show empty TV shows".

@Hitcher
Copy link
Contributor

Hitcher commented May 5, 2024

Workaround: Manually enter the context menu of the TV show in GUI -> Manage -> Remove from library

This is the expected way to remove a TV Show.

@Hitcher Hitcher closed this as completed May 5, 2024
@pipsen
Copy link
Author

pipsen commented May 5, 2024

Sorry but form my perspective it is not consistent. Movies are removed automatically, TvShows not... why should an already removed tvshow (the whole folder is gone) still persist as empty in the library? doesn't make sense at all

@DaVukovic
Copy link
Member

@Hitcher and @wutschel I somewhat agree. Especially on that comment:

You can for example also create an empty folder named after a TV show and do scan. The TV show will show up, but w/o any episodes.

But in that case, and I can also reproduce it, the user also removes the folder. So the folder doesn't exist anymore. What sense does it make to keep the tv show if the folder for it doesn't exist anymore?

I would completely agree if the folder would still exist, but that's not the case. Hence "cleanonupdate" should do what it's meant for....cleaning the database and remove the tv-show completely.

I can confirm that disabling "show empty tv shows" kind of solves that problem. But from my POV, if the folder doesn't exist anymore, there's no need to keep the tv-show at the library.

@pipsen
Copy link
Author

pipsen commented May 6, 2024

Addtional Comment:
Disabling "show empty tv shows" just hides the problem - does not solve it. The database / library will we full of old tvshow information of all times - they could be deleted many years ago and still persist in the database, which doesn't make it faster or smaller

@DaVukovic
Copy link
Member

I talked to @Hitcher and he's fine for me to re-open this issue.

It might have been this way since "ever", but that doesn't mean it's correct. If the folder would exist and only the files have been removed, that I would totally agree. But if the folder doesn't exist anymore, then there's no need to fill the database with information which doesn't have any source anymore.

@DaVukovic DaVukovic reopened this May 6, 2024
@DaVukovic DaVukovic added Component: Database Triage: Confirmed issue has been reproduced by a team member v21 Omega and removed Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it labels May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Database Triage: Confirmed issue has been reproduced by a team member v21 Omega
Projects
None yet
Development

No branches or pull requests

4 participants