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

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

Open
appiekap653 opened this issue Mar 1, 2024 · 17 comments · Fixed by #951
Open
Assignees
Labels
bug Something isn't working

Comments

@appiekap653
Copy link
Contributor

appiekap653 commented Mar 1, 2024

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

@jorenn92
Copy link
Owner

jorenn92 commented Mar 4, 2024

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.

@appiekap653
Copy link
Contributor Author

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.

@jorenn92
Copy link
Owner

jorenn92 commented Mar 4, 2024

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 jorenn92 self-assigned this Mar 4, 2024
@jorenn92 jorenn92 added the bug Something isn't working label Mar 4, 2024
@appiekap653
Copy link
Contributor Author

I will test it out right away

@Old-T
Copy link

Old-T commented Mar 4, 2024

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?

@appiekap653
Copy link
Contributor Author

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
Copy link
Contributor Author

appiekap653 commented Mar 4, 2024

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
Copy link
Contributor Author

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

@jorenn92
Copy link
Owner

jorenn92 commented Mar 4, 2024

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.

@Old-T
Copy link

Old-T commented Mar 4, 2024

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!

@jorenn92
Copy link
Owner

jorenn92 commented Mar 4, 2024

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
Copy link
Owner

jorenn92 commented Mar 4, 2024

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
Copy link
Owner

jorenn92 commented Mar 4, 2024

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..

@appiekap653
Copy link
Contributor Author

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.

@Bod1985
Copy link

Bod1985 commented Mar 10, 2024

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

@jorenn92
Copy link
Owner

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants