fix: keep the monitored state when a season is partially downloaded - #32
Open
Raffa2001 wants to merge 1 commit into
Open
fix: keep the monitored state when a season is partially downloaded#32Raffa2001 wants to merge 1 commit into
Raffa2001 wants to merge 1 commit into
Conversation
The status chain in ServarrProgressService has branches for "nothing downloaded" and "everything downloaded", but none for a season where some episodes have files. Such a request matches neither `allHaveFiles` nor `!anyFile`, so it reaches the final return, which hardcodes `monitored: false` and renders "Missing (Unmonitored)" even when every episode is monitored in Sonarr. That is the normal state of any currently airing show, so the label was effectively permanent for those requests. Pass `anyMonitored` instead of the hardcoded `false`, so a partially downloaded season that is still monitored reads "Missing (Monitored)". No other branch changes behaviour: the earlier `!anyFile && anyMonitored` return already covers the "nothing downloaded yet" case identically.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #31.
The problem
Any TV request whose season is partially downloaded — the normal state of a
currently airing show — is shown as
Missing (Unmonitored)on the Requests tab,even when every episode is monitored in Sonarr.
ServarrProgressService.csdecides the label with this chain (lines ~330–348):There are branches for nothing downloaded and for everything downloaded, but
none for some episodes downloaded:
allHaveFilesis false → branches 2 and 3 are skipped!anyFileis false → branch 4 is skipped, even when every episode ismonitored
So it reaches the final
return, which hardcodesmonitored: false. Thelabel's second half is then simply untrue.
This is not about season scoping —
FilterEpisodesBySeasonsworks correctly.Verified below: restricting to the requested season changes the episode count
but not the outcome.
The change
BuildLibraryProgress(hasFile: false, monitored: true, …)already rendersMissing (Monitored), so no new state is introduced and no other branch changesbehaviour — the earlier
!anyFile && anyMonitoredreturn covers the "nothingdownloaded yet" case identically.
Verified against
Tomb Raider King— s1Missing (Unmonitored)Missing (Monitored)That Time I Got Reincarnated as a Slime— s4Missing (Unmonitored)Missing (Monitored)Numbers taken from
GET /api/v3/episode?seriesId=N. In the second case theseason filter is demonstrably active — the requested season yields 24 episodes
where the whole series has 96 — and the label was unchanged, which is what rules
scoping out as the cause.
Environment: SeerrFin 1.6.6.0 · Jellyfin 10.11.11 · Sonarr 4.0.19.2979 ·
Jellyseerr 3.4.1.
Builds clean against
JellyfinVersion=10.11.11on .NET 9 — 0 warnings, 0 errors.Possible follow-up (not in this PR)
A partially downloaded season could deserve its own state rather than sharing
Missing: the progress bar currently reads 0% whiletotalSizeis alreadyknown for the episodes that do have files, so it could show real progress.
Also worth knowing: Sonarr's series-level
statistics.episodeFileCountcountsonly monitored episodes — it reports 4/4 for the first case above while the
episode list reports 4 of 12. If that field is used anywhere the two numbers
will disagree in exactly this scenario.