Skip to content

Conversation

@bonswouar
Copy link

@bonswouar bonswouar commented Jun 14, 2024

Description

Quick & easy first implementation of Monitoring status support in Radarr:
When a movie - which was monitored before - is unmonitored, it won't appear as "requested" in Jellyseerr anymore

Issues Fixed or Closed

@bonswouar bonswouar requested a review from fallenbagel as a code owner June 14, 2024 21:39
@bonswouar bonswouar changed the title feat: set movie status to unknown if unmonitored from radarr during scan feat: set movie status to unknown if unmonitored from radarr during scan [WIP] Jun 14, 2024
@fallenbagel fallenbagel marked this pull request as draft June 15, 2024 04:50
@fallenbagel
Copy link
Collaborator

Converted to draft as the title states "WIP". Once it's ready feel free to make this pr ready for review

@bonswouar
Copy link
Author

@fallenbagel Thanks I didn't think about the Draft feature

This is a WIP but it's basically working as I'd expect.
But I could update it with a more specific Monitoring status support if you think it's a good idea?

Only drawback is that if you have lots of Unmonitored movies in Radarr the scan should be slower, as it will request each unmonitored movie in db every time. Let me know if you have some thoughts about this

@bonswouar
Copy link
Author

FYI I've been using this for months and it works as expected.
I suspect some other users might need this functionality, couldn't we merge it?

A more complete monitoring status support wouldn't be very useful imo, at least I didn't encounter any use case

@bonswouar bonswouar changed the title feat: set movie status to unknown if unmonitored from radarr during scan [WIP] feat: set movie status to unknown if unmonitored from radarr during scan Sep 27, 2024
@gauthier-th gauthier-th marked this pull request as ready for review September 27, 2024 14:10
@gauthier-th gauthier-th self-requested a review as a code owner September 27, 2024 14:10
Copy link
Member

@gauthier-th gauthier-th left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should be merged if it's only Radarr. Could you implement the same logic for Sonarr seasons?
And shouldn't there be a setting to enable/disable this behavior? You may have unmonitored a movie/tv show but still want to keep it as requested.

@gauthier-th gauthier-th linked an issue Oct 6, 2024 that may be closed by this pull request
1 task
@github-actions
Copy link

This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.

@github-actions github-actions bot added the merge conflict Cannot merge due to merge conflicts label Nov 10, 2024
@github-actions github-actions bot removed the merge conflict Cannot merge due to merge conflicts label Nov 10, 2024
@bonswouar

This comment was marked as outdated.

@bonswouar bonswouar changed the title feat: set movie status to unknown if unmonitored from radarr during scan feat: remove requests of unmonitored movies/seasons during scan Nov 10, 2024
@bonswouar

This comment was marked as outdated.

Copy link
Member

@gauthier-th gauthier-th left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the way things are done are not consistent between Radarr and Sonarr.
Why do you change the status of the Media entity for movies while you remove the SeasonRequest for series?
It may be linked to the issue you experienced.

Comment on lines 288 to 295
: settings.main.removeUnmonitoredFromRequestsEnabled &&
!season.monitored &&
season.episodes == 0
? MediaStatus.UNKNOWN
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change necessary? Isn't the Sonarr scanner job enough?

This comment was marked as outdated.

@gauthier-th
Copy link
Member

Also, not really related to this issue afaik, but still looks like the same kind of problem: I've noticed during my debugging that some Seasons are shown as "Available" although they don't contain any file in Sonarr (and are not monitored). I'd guess it's related to If the season is already marked as available, we force it to stay available (to avoid competing scanners), but I'm really not sure why this condition exists despite the comment (why not at least check if it has any episode instead of relying entirely on the previous status?!)

There are several jobs that update the status of a Media: Radarr/Sonarr jobs, and Jellyfin/Emby/Plex jobs, hence the comment about competing jobs.

@bonswouar

This comment was marked as outdated.

@bonswouar

This comment was marked as outdated.

@bonswouar

This comment was marked as outdated.

@gauthier-th
Copy link
Member

I still don't get the logic, why "If the season is already marked as available, we force it to stay available"?
What if the season is not available anymore??!

There is another job, "Media Availability Sync" that runs and mark the media as unavailable if necessary.

Is there something I should know about async deletion in typescript or something? This seems a bit random

It could come from your forEach loops. For instance in the processUnmonitoredSeason you are using an async function inside a forEach loops, but forEach loops don't wait the end of the async function to run the next item. IMHO It's better to use a for loop to iterate over an array than a forEach, because of this async function concurrency.

Let me review it one more time with the change you made and with your comments in mind.

@bonswouar

This comment was marked as outdated.

@bonswouar
Copy link
Author

bonswouar commented Jan 11, 2025

Movies added and monitored in radarr will not show as requested. Can you test this. We don't do bidirectional sync like this.

Well I've just checked some random recently auto-imported (and monitored) movies in Radarr, I confirm it's still the case.

But that can make sense, specifically when they're unreleased: users shouldn't need/be able to request movies that will already be automatically downloaded when they're available I guess (at least in current Jellyseer's state; it could be useful if Movies can be requested by more than 1 user though).
I don't know if this was a bug that they originally appear as requested, but I like that users can focus to request only really-not-monitored movies!

@bonswouar
Copy link
Author

bonswouar commented Jan 11, 2025

If you believe so could you record and show me after adding a movie as monitored (a new movie) and then show me that exact same movie as marked as requested on jellyseerr?

So the ones added today don't appear as Requested as the sync didn't happen yet.
But added yesterday for example:

image
image

(But again, I think in current state of thing this is a wanted behaviour, as Monitored status isn't shown. Otherwise users will request "for nothing" all the unreleased movies that are already monitored! Be able to request an already-monitored movie could make sense only if more than 1 user is able to request a movie imo - they could then be seen more like a "follow" movie)

@fallenbagel
Copy link
Collaborator

If you believe so could you record and show me after adding a movie as monitored (a new movie) and then show me that exact same movie as marked as requested on jellyseerr?

So the ones added today don't appear as Requested as the sync didn't happen yet. But added yesterday for example:

image image

(But again, I think in current state of thing this is a wanted behaviour, as Monitored status isn't shown. Otherwise users will request "for nothing" all the unreleased movies that are already monitored! This could make sense only if more than 1 user is able to request a movie imo - requests could then be seen more like a "follow" movie)

Oh so it does change the status. I see. iirc it wasn't like this previously as I remember being able to request ones already added to radarr (but i guess this was changed recently and since I haven't looked into it yet did not notice it). I will have a look at it.

@bonswouar
Copy link
Author

bonswouar commented Jan 11, 2025

iirc it wasn't like this previously as I remember being able to request ones already added to radarr (but i guess this was changed recently and since I haven't looked into it yet did not notice it)

This has been like that since I use Jellyseer I believe, so more than 1 year. But for sure at least since I've reported the issue (of movies that still appear as requested even after being unmonitored), so since April

If you "fix" that behavior, users will be even less informed about what's monitored or not though, right?

@fallenbagel
Copy link
Collaborator

This has been like that since I use Jellyseer I believe, so more than 1 year. But for sure at least since I've reported the issue (of movies that still appear as requested even after being unmonitored), so since April

We started as a fork during 2022. IIRC it did not work like that because I remember support requests about it (but i could be misremembering as well)

If you "fix" that behavior, users will be even less informed about what's monitored or not though, right?

Yes. Which is why i said I will look into it for a better way to handle this without requiring major refactors

@github-actions github-actions bot added the merge conflict Cannot merge due to merge conflicts label Jan 16, 2025
@github-actions
Copy link

This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.

@github-actions github-actions bot removed the merge conflict Cannot merge due to merge conflicts label Jan 23, 2025
@github-actions github-actions bot added the merge conflict Cannot merge due to merge conflicts label Feb 20, 2025
@github-actions
Copy link

This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.

@bonswouar bonswouar force-pushed the radarr-monitoring branch from c014ed8 to a3e2de1 Compare July 17, 2025 12:18
@github-actions github-actions bot removed the merge conflict Cannot merge due to merge conflicts label Jul 17, 2025
@bonswouar bonswouar changed the title feat: remove requests of unmonitored movies/seasons during scan feat: remove requests of unmonitored movies during scan Jul 17, 2025
@bonswouar
Copy link
Author

Just a little reminder, if you have an idea for a better way of handling this let me know I could probably look into it.

Otherwise, I've been using my fork for more than a year and it works exactly as expected fyi

@bonswouar bonswouar changed the title feat: remove requests of unmonitored movies during scan feat: remove "requested" status of unmonitored movies during scan Jul 17, 2025
@github-actions github-actions bot added the merge conflict Cannot merge due to merge conflicts label Oct 6, 2025
@github-actions
Copy link

github-actions bot commented Oct 6, 2025

This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.

@bonswouar bonswouar requested a review from a team as a code owner October 7, 2025 08:35
@github-actions github-actions bot removed the merge conflict Cannot merge due to merge conflicts label Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support monitor type for Radarr

3 participants