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.
|
Thank you for your contribution. The diagnosis is correct, but anyMonitored includes downloaded episodes.
After that, this should safely close #31. |
…is monitored Follow-up to the review: `anyMonitored` is true when *any* episode is monitored, including ones that already have a file. For the "Missing (Monitored)" label the monitoring that matters is the monitoring of the episodes that are actually missing, so a season whose downloaded episodes are monitored but whose missing ones are not was about to be mislabelled the other way round. Introduce `anyMissingMonitored`, restricted to episodes without a file, and use it in the final return. The earlier `!anyFile && anyMonitored` branch is left untouched on purpose: when nothing has a file every episode is missing, so the two predicates are equivalent there and changing it would only add noise. Verified on a live library: 18 partially downloaded seasons, of which 2 are exactly the case the review describes (downloaded episodes monitored, missing ones not). Those two keep "Missing (Unmonitored)" with this change and would have flipped to "Monitored" without it. Builds clean on the branch: 0 warnings, 0 errors. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Thanks for the review — you were right on all three points. Revised commit pushed ( 1. Monitoring restricted to the missing episodesbool anyMissingMonitored = episodes.Any(e => e.Value<bool?>("hasFile") != true
&& e.Value<bool?>("monitored") == true);used in the final 2. Intended UI — confirmed, and it is worth being explicit aboutWith // Unsure state (don't show a bar). Maybe show a gray bar?
mapped.Remove("servarrProgress");So the visible effect of this PR is not a 3. Tested on monitored and unmonitored partial seasonsLive library, numbers straight from
Those two are exactly the case you described: the downloaded episodes are monitored, the missing ones are not. With this change they keep Builds clean on the branch ( |
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.