Maintainerr icon indicating copy to clipboard operation
Maintainerr copied to clipboard

[BUG] Seasons get unmonitored mid-season after being handled with Media-Type: Seasons

Open appiekap653 opened this issue 11 months ago • 17 comments

Describe the bug When using a rule collection with Media Type: Seasons and the series has a mid-season stop with a duration longer then the action timeout days, the season will get unmonitored in Sonarr so when the series continues it will no longer download further episodes.

Settings:

Media Type: Seasons Sonarr Action: Unmonitor and Delete Existing Episodes Take Action After: 14 Days

Rules: Users that saw all available episodes - contains - Me

There are 3 Sonarr actions to choose from:

  • Unmonitor and Delete Season
  • Unmonitor and Delete Existing Episodes
  • Unmonitor Season and Keep Files

I was expecting that only the existing episodes would get unmonitored and not the season itself, so that future episodes from that season will still get downloaded.

Instead all episodes and the season gets unmonitored.

There are some series that have for example first only 6 episodes in a season and later other episodes get added to the season when more information about the number of episodes are revealed.

Or some series have mid-season stops.

In both situations Sonarr will no longer download further releases.

This Series has two more episodes that are not yet on TVDB. But will not download episodes 19 and 20 when handled:

Screenshot_20240301_194012_Firefox

appiekap653 avatar Mar 01 '24 18:03 appiekap653

Hello!

A possible workaround could be to include "'Sonarr - Has unaired episodes' equals false" in your rules for now. This way, it will not select seasons that are incomplete.

Upon examining the code, I see that it indeed handles the entire season in all cases. I will correct this issue as soon as possible.

jorenn92 avatar Mar 04 '24 07:03 jorenn92

Thank you very much.

I already use the rule: Sonarr - Has un-aired episodes equals false.

But that will not work because in most times the total number of episodes and release dates are not yet known, and therefore are not yet present on TVDB.

Just like the series on the screenshot, it will have 'Has un-aired episodes' False, while there still are more episodes to come. Probably 2 more when comparing with previous seasons, but for sure 1 because it was announced at the end of episode 18.

But because the season itself is unmonitored after maintainerr handled it, the next episodes will not get downloaded, even when someone added the episodes on TVDB.

appiekap653 avatar Mar 04 '24 09:03 appiekap653

I merged a possible solution in #951, but it still needs testing before I'm able to release it. If you'd like, you may temporarily use the jorenn92/maintainerr:develop or ghcr.io/jorenn92/maintainerr:main image to test the latest build & this feature.

If you do, please keep me posted if this solution works for you (and doesn't break anything else)

jorenn92 avatar Mar 04 '24 09:03 jorenn92

I will test it out right away

appiekap653 avatar Mar 04 '24 09:03 appiekap653

Can I just ask another question in the same area? I'm using Shows - Unmonitor show and keep files. with the rule "Sonarr - Is monitored == true" AND "Sonarr - Show anded == true" When the rule is run, the season episodes are unmonitored but the Show is still monitored. I thought that "Unmonitor show and keep files" would set the show itself to unmonitored. Have I misunderstood the functionality?

Old-T avatar Mar 04 '24 09:03 Old-T

While testing something is going wrong that is not related to this issue.

Before going to develop branch I had for 'Take Action After Days' = 7

Series Collection:

True Detective: 6
The Last Airbender: 4
90 Days Fiance: 2
The Killing Kind: 2
Can I Tell You a Secret: 2

Then changed to develop branch.

Then changed the 7 to 0 and pressed 'Run Rules'

After that the number of days to delete was changed not to 0 but to this:

Screenshot_20240304_103426_Chrome

Then I changed the 0 to 1 and pressed again 'Run Rules'

After that the number of days to delete was changed not to 1 but to this:

Screenshot_20240304_103718_Chrome

I cannot see any logic in this change of numbers.

appiekap653 avatar Mar 04 '24 09:03 appiekap653

As a work-around for now to test the unmonitored change, I deleted the rules collection and made a new rules collection with 'Take Action After Days' = 0.

After pressing 'Run Rules' the number of days to delete was set to 1:

Screenshot_20240304_115931_Chrome

It should have showed 0 right?

It did Delete all the series when the handle collection job was run at 12.00 automatically.

appiekap653 avatar Mar 04 '24 11:03 appiekap653

The unmonitored change works. After the series was deleted by Maintainerr the season is still monitored on Sonarr and after I added the remaining episodes the episodes were also monitored. 😁😁😁

Screenshot_20240304_122521_Chrome

appiekap653 avatar Mar 04 '24 11:03 appiekap653

Can I just ask another question in the same area? I'm using Shows - Unmonitor show and keep files. with the rule "Sonarr - Is monitored == true" AND "Sonarr - Show anded == true" When the rule is run, the season episodes are unmonitored but the Show is still monitored. I thought that "Unmonitor show and keep files" would set the show itself to unmonitored. Have I misunderstood the functionality?

That wasn't correct either.. Fixed in https://github.com/jorenn92/Maintainerr/pull/952. Once merged (after all tests finished), you'll also be able to verify this with the develop / main image. Probably in about 30 minutes, factoring in the build of the Docker image as well.

jorenn92 avatar Mar 04 '24 12:03 jorenn92

Can I just ask another question in the same area? I'm using Shows - Unmonitor show and keep files. with the rule "Sonarr - Is monitored == true" AND "Sonarr - Show anded == true" When the rule is run, the season episodes are unmonitored but the Show is still monitored. I thought that "Unmonitor show and keep files" would set the show itself to unmonitored. Have I misunderstood the functionality?

That wasn't correct either.. Fixed in #952. Once merged (after all tests finished), you'll also be able to verify this with the develop / main image. Probably in about 30 minutes, factoring in the build of the Docker image as well.

Wow! That was a quick response :-) Thank you!

Old-T avatar Mar 04 '24 12:03 Old-T

As a work-around for now to test the unmonitored change, I deleted the rules collection and made a new rules collection with 'Take Action After Days' = 0.

After pressing 'Run Rules' the number of days to delete was set to 1:

Screenshot_20240304_115931_Chrome

It should have showed 0 right?

It did Delete all the series when the handle collection job was run at 12.00 automatically.

I'm not exactly sure why you're seeing the strange behavior in the number of days, but using 0 isn't tested or recommended. The UI does accept it, but I don't think the backend will do anything.

I'm not going to look into it right now, since this only arises when messing with the timers. But I'll write it down and might look into it at a later date.

jorenn92 avatar Mar 04 '24 12:03 jorenn92

The unmonitored change works. After the series was deleted by Maintainerr the season is still monitored on Sonarr and after I added the remaining episodes the episodes were also monitored. 😁😁😁

Screenshot_20240304_122521_Chrome

Great! Glad to hear it works :)

jorenn92 avatar Mar 04 '24 12:03 jorenn92

Can I just ask another question in the same area? I'm using Shows - Unmonitor show and keep files. with the rule "Sonarr - Is monitored == true" AND "Sonarr - Show anded == true" When the rule is run, the season episodes are unmonitored but the Show is still monitored. I thought that "Unmonitor show and keep files" would set the show itself to unmonitored. Have I misunderstood the functionality?

That wasn't correct either.. Fixed in #952. Once merged (after all tests finished), you'll also be able to verify this with the develop / main image. Probably in about 30 minutes, factoring in the build of the Docker image as well.

Wow! That was a quick response :-) Thank you!

No problem! Please let me know if it doesn't work as expected. I didn't test it yet..

jorenn92 avatar Mar 04 '24 12:03 jorenn92

As a work-around for now to test the unmonitored change, I deleted the rules collection and made a new rules collection with 'Take Action After Days' = 0. After pressing 'Run Rules' the number of days to delete was set to 1: Screenshot_20240304_115931_Chrome It should have showed 0 right? It did Delete all the series when the handle collection job was run at 12.00 automatically.

I'm not exactly sure why you're seeing the strange behavior in the number of days, but using 0 isn't tested or recommended. The UI does accept it, but I don't think the backend will do anything.

I'm not going to look into it right now, since this only arises when messing with the timers. But I'll write it down and might look into it at a later date.

With number of days 0 I was not sure it would be implemented and expected maybe some failure.

But when I changed it from 7 to 1 it was doing weird changes as well.

appiekap653 avatar Mar 04 '24 13:03 appiekap653

I merged a possible solution in #951, but it still needs testing before I'm able to release it. If you'd like, you may temporarily use the jorenn92/maintainerr:develop or ghcr.io/jorenn92/maintainerr:main image to test the latest build & this feature.

If you do, please keep me posted if this solution works for you (and doesn't break anything else)

I think this may be working for seasons not fully watched, but if the season is entirely watched it doesn't unmonitor any episodes at all.

Here's an example of a season recently removed using the following config:

image image

Note that nothing got unmonitored in the process - only files got deleted. This is using ghcr.io/jorenn92/maintainerr:main pulled at 18:00 10th March 2024

Bod1985 avatar Mar 10 '24 18:03 Bod1985

I merged a possible solution in #951, but it still needs testing before I'm able to release it. If you'd like, you may temporarily use the jorenn92/maintainerr:develop or ghcr.io/jorenn92/maintainerr:main image to test the latest build & this feature. If you do, please keep me posted if this solution works for you (and doesn't break anything else)

I think this may be working for seasons not fully watched, but if the season is entirely watched it doesn't unmonitor any episodes at all.

Here's an example of a season recently removed using the following config:

image image Note that nothing got unmonitored in the process - only files got deleted. This is using ghcr.io/jorenn92/maintainerr:main pulled at 18:00 10th March 2024

Hmm, i’ll try to replicate it. I’ll get back to you!

jorenn92 avatar Mar 14 '24 06:03 jorenn92

I merged a possible solution in #951, but it still needs testing before I'm able to release it. If you'd like, you may temporarily use the jorenn92/maintainerr:develop or ghcr.io/jorenn92/maintainerr:main image to test the latest build & this feature. If you do, please keep me posted if this solution works for you (and doesn't break anything else)

I think this may be working for seasons not fully watched, but if the season is entirely watched it doesn't unmonitor any episodes at all.

Here's an example of a season recently removed using the following config: image image

Note that nothing got unmonitored in the process - only files got deleted. This is using ghcr.io/jorenn92/maintainerr:main pulled at 18:00 10th March 2024

Have you observed this issue recurring in recent weeks? I haven't had the opportunity to investigate it further yet.

jorenn92 avatar Mar 25 '24 14:03 jorenn92