jorenn92 / Maintainerr

Looks and smells like Overseerr, does the opposite. Maintenance tool for the Plex ecosystem
https://maintainerr.info
MIT License
649 stars 12 forks source link

Show does not delete after "Take action after days" = 0 #1140

Open truncsphere opened 4 weeks ago

truncsphere commented 4 weeks ago

Describe the bug I have a rule that deletes stale shows that haven't been watched in over 1 year. Currently 2 shows fit this description. I have watched the countdown reach 0 twice and neither time did it delete the show. Instead the logs show it's been removed from the collection and then it re-adds and restarts the timer.

Expected behavior To delete said shows after 30 days.

Screenshots image

Device (please complete the following information):

Other notes I have a rule to delete movies not watched after X years and it removes these with no issues.

adampetrovic commented 3 weeks ago

Also have the same problem, running on both older versions and the most recent version. The logs aren't overly helpful. I can see there's a problem but it's just logging out a generic error.

[maintainerr] | 22/06/2024 03:49:52  [WARN] [OverseerrGetterService] Couldn't get addUser from Overseerr
[maintainerr] | 22/06/2024 03:49:52  [DEBUG] [OverseerrGetterService] Cannot read properties of undefined (reading 'seasonNumber')
[maintainerr] | 22/06/2024 03:50:04  [DEBUG] [undefined] GET request failed: AxiosError: Request failed with status code 500
[maintainerr] | 22/06/2024 03:50:04  [WARN] [OverseerrGetterService] Couldn't get addUser from Overseerr
[maintainerr] | 22/06/2024 03:50:04  [DEBUG] [OverseerrGetterService] Cannot read properties of undefined (reading 'seasonNumber')
[maintainerr] | 22/06/2024 03:50:12  [DEBUG] [undefined] GET request failed: AxiosError: Request failed with status code 500
jorenn92 commented 3 weeks ago

Hey, something else re-adds the media. Mostly this is a due to Overseerr’s auto watchlist download feature. Make sure something like that isn’t enabled

adampetrovic commented 3 weeks ago

Overseerr works off the Plex Watchlist. None of these items are on that list.

screenshot_2024_06_22_19_07_43

truncsphere commented 3 weeks ago

I don't use watchlists with Overseer so the media is not being re-added. It never gets deleted.

truncsphere commented 1 week ago

Any update on this issue?

jorenn92 commented 3 days ago

Hey, Sorry for the late reply. I haven't seen any related reports and haven't been able to replicate this myself. So i'm actually unsure what's going on. Do you happen to have logs from Plex, Sonarr, and perhaps Overseerr during the deletion timeframe?

I think it has something to do with a failure to fetch the tvdb id, which is used for removal through Sonarr. Altough it should log a message when this is the case.

This error is due to a failure while fetching the tvdb ID from tmdb. But there are a few fallback mechanisms, so it's possible one of those did find the ID. [maintainerr] | 22/06/2024 03:50:12 [DEBUG] [undefined] GET request failed: AxiosError: Request failed with status code 500

truncsphere commented 2 days ago

So this just happened to happen again this morning. Shows got removed by Maintainer, but are still on Plex. The shows were re-added and the counter started again at 30 days.

I check Sonarr logs and didn't see anything around the time these were supposed to be deleted. The closest I found was below 2024-07-16 08:58:47.8|Info|RefreshEpisodeService|Starting episode info refresh for: [341164][Yellowstone (2018)] 2024-07-16 08:58:48.4|Info|RefreshEpisodeService|Finished episode refresh for series: [341164][Yellowstone (2018)]. 2024-07-16 08:58:48.4|Info|DiskScanService|Scanning Yellowstone (2018) 2024-07-16 08:58:48.4|Info|DiskScanService|Completed scanning disk for Yellowstone (2018)

Overseer shows the following image

However these are just refreshes and nothing re-downloaded to my server.

jorenn92 commented 1 day ago

I pushed a few changes that might fix your issue. If not, it'll hopefully log more 'debug' level info this time,

You can try it out with the 'ghcr.io/jorenn92/maintainerr:main' image. This image gets build after each git change. I don't recommend to stay on it for long, since this image might not stay stable, and after big changes you might not always be able to roll back to the latest release version. However, for now it'll be safe.

truncsphere commented 1 day ago

I pushed a few changes that might fix your issue. If not, it'll hopefully log more 'debug' level info this time,

You can try it out with the 'ghcr.io/jorenn92/maintainerr:main' image. This image gets build after each git change. I don't recommend to stay on it for long, since this image might not stay stable, and after big changes you might not always be able to roll back to the latest release version. However, for now it'll be safe.

I just installed the main version. Will let you know in 4 days what happens.