Repository navigation
feat(downloads): choose a quality for season downloads and monitors - #598
Conversation
- The series Download sheet has a Quality row for one-time downloads and monitors. It starts at the quality set in Settings, and an existing monitor opens with its own. - Season and series downloads send the chosen quality, and monitors store it, on servers that report bulk_quality and monitor_quality. Older servers keep original quality, and the sheet says so. - A monitor at a lower quality shows it in the Monitored list. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c3986e96a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case let .seriesPage(seriesId, _, batchId, _, _): | ||
| guard created.batchId == batchId, | ||
| created.items.count + created.skipped.count <= downloadRegistryPageLimit, | ||
| created.items.allSatisfy({ $0.contentId == seriesId && $0.episodeId?.isEmpty == false }) else { |
There was a problem hiding this comment.
Reject batch receipts with the wrong quality
When a season or series request asks for a non-original quality, this branch discards the requested quality and accepts every returned entry based only on its series and episode IDs. A stale or malformed server response can therefore be stored and downloaded at a different quality than the user selected, whereas single-item receipts explicitly verify entry.quality == quality. Include the requested quality in the batch receipt validation before applying its entries.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changing this. A batch page answers with existing managed entries unchanged, including their chosen bytes and quality (docs/downloads-api.md, "Batch pages preserve existing managed entries by default, including their chosen bytes, completion or terminal status, revision and previous batch membership"), and a preset an episode can't reach is skipped rather than substituted. An episode already downloaded at Original therefore comes back at Original in a 5 Mbps season request, which is correct; rejecting the receipt on quality would refuse valid answers. Series and episode identity, batch, device, and page bounds are still checked.
…y-picker # Conflicts: # iosApp/iosApp/Downloads/Views/SeriesDownloadSheet.swift
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aecc7fb972
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The download quality footer says the setting is the default for every download and monitor when the server takes a quality for seasons, and keeps "original quality" for seasons only on servers that don't. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d3cdf34dfd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A one-time or new-monitor quality the server no longer offers falls back to the Settings default when the presets change, so the menu never shows a quality the request wouldn't use. Only an existing monitor's stored quality stays listed when it isn't offered. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2faa910ab4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ake one On a server that takes a quality for seasons but not for monitors, the Settings note says monitored series download in original quality. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… preparing (#599) * feat(downloads): show titles and progress for downloads the server is preparing - Season, series, and monitor downloads arrive without a title or artwork, and their manifest was read only once the file was ready. The app now reads each untitled download's manifest right away for its title, episode number, and series poster. - A preparing row shows the server's queue position or encode progress and time left, on servers that report preparation_progress. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): retry display reads after connection failures Only a refusal of a download (a 4xx other than a timeout or rate limit) stops its manifest being read again this session. A connection failure, timeout, or busy server ends the pass, and the next pass retries. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): run another display pass for records added during one Pages of a season registered while a display pass runs now get their own pass once it finishes, instead of waiting for an unrelated trigger. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): skip an unusable manifest instead of ending the display pass A manifest the app can't use is now a lasting failure for that download, like a refusal, so later downloads still get their titles and artwork. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
…ad sheet (#597) * feat(downloads): show monitored series and simplify the series Download sheet - A Monitored list in Downloads shows each monitored series, its rule, and what downloads next, using the airing calendar for upcoming episodes. - The series page's Download action opens one sheet: One Time (this episode, a season, or all episodes) or Monitor (All Episodes, Future Episodes, or Last Season), with delete-after-watching and a storage limit. - A banner on a monitored series' page says what downloads next. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): keep monitor choices to what the server offers - A new monitor starts on the first rule the server advertises instead of a hidden Future Episodes. - An existing monitor's tab stays reachable when the server stops offering monitoring, so it can still be stopped; saving is disabled there. - A calendar refresh after a profile switch no longer waits on the old profile's load and keeps nothing. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): keep the shown episode version and existing monitor rules - The Download sheet downloads the episode version the series page shows, including an automatic pick, rather than leaving it to the server. - An existing monitor's rule stays listed when the server stops advertising it, and is not resent unless the user changes it. - Monitored series load their titles and posters four at a time. - A failed download no longer hides its episode from "next episode". Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): don't call a monitor up to date before its calendar loads - An idle monitor shows "Monitoring" until the airing calendar has loaded for the profile, instead of "Up to date". - The Download sheet treats an episode whose download request is still in flight as on its way, so it isn't offered again. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): back off series detail reads that failed A monitored series whose title and poster read failed isn't read again until the calendar refresh interval passes, instead of on every view appearance. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): fence the monitor schedule by scope and load - A schedule loaded for another server or profile reads as empty and not loaded, so a switched profile shows "Monitoring" until its own loads. - Each calendar load carries a token; only the current one publishes or clears the in-flight slot. - The Monitor tab is hidden for a new monitor when the server advertises no rule the sheet offers, such as specific seasons only. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): scope monitored series titles and posters to the profile Series titles and posters are read through a scope-checked accessor, and a details load after a profile switch first drops the previous profile's data instead of storing alongside it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): mention monitoring on the empty Downloads screen When the server offers monitoring, the empty Downloads screen also says how to start one, since the Monitored list is reached from Downloads only once something is downloaded or monitored. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(downloads): choose a quality for season downloads and monitors (#598) * feat(downloads): choose a quality for season downloads and monitors - The series Download sheet has a Quality row for one-time downloads and monitors. It starts at the quality set in Settings, and an existing monitor opens with its own. - Season and series downloads send the chosen quality, and monitors store it, on servers that report bulk_quality and monitor_quality. Older servers keep original quality, and the sheet says so. - A monitor at a lower quality shows it in the Monitored list. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): describe season and monitor quality in Settings The download quality footer says the setting is the default for every download and monitor when the server takes a quality for seasons, and keeps "original quality" for seasons only on servers that don't. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): drop quality choices the server stops offering A one-time or new-monitor quality the server no longer offers falls back to the Settings default when the presets change, so the menu never shows a quality the request wouldn't use. Only an existing monitor's stored quality stays listed when it isn't offered. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): mention monitors in the quality note only when they take one On a server that takes a quality for seasons but not for monitors, the Settings note says monitored series download in original quality. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(downloads): show titles and progress for downloads the server is preparing (#599) * feat(downloads): show titles and progress for downloads the server is preparing - Season, series, and monitor downloads arrive without a title or artwork, and their manifest was read only once the file was ready. The app now reads each untitled download's manifest right away for its title, episode number, and series poster. - A preparing row shows the server's queue position or encode progress and time left, on servers that report preparation_progress. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): retry display reads after connection failures Only a refusal of a download (a 4xx other than a timeout or rate limit) stops its manifest being read again this session. A connection failure, timeout, or busy server ends the pass, and the next pass retries. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): run another display pass for records added during one Pages of a season registered while a display pass runs now get their own pass once it finishes, instead of waiting for an unrelated trigger. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): skip an unusable manifest instead of ending the display pass A manifest the app can't use is now a lasting failure for that download, like a refusal, so later downloads still get their titles and artwork. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): don't record a display failure from an outdated scope A manifest read that fails after the server or profile changed no longer adds its download to the new scope's skip list. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): read display manifests four at a time and retry after outages - Untitled downloads' manifests are read four at a time instead of one by one. - A pass that a connection failure, timeout, or busy server ends schedules another, waiting 15 seconds and doubling up to five minutes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(downloads): show when a download's preparation is paused A preparing download whose server job an administrator paused reads "Preparation paused on the server" (Silo-Server/silo-server#1925). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): drop a display retry when the scope changes A pending display-fill retry is cancelled when the server or profile changes, and a retry only runs in the scope that scheduled it, so the previous scope's backoff can't hold back the new scope's retries. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): keep long quality values on one line in the Download sheet The Quality and Storage limit menus shared the row width with their label, so a preset like "1 Mbps · up to 480p" wrapped out of the row. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): keep the monitor banner and display-fill retries reachable Show the series banner for an existing monitor even when the server no longer offers monitoring, as the Monitored list does, so it can still be stopped from the series page. A display-fill retry that woke after its scope was gone returned without clearing itself, so if that scope came back the finished task blocked every later retry. It now clears itself before checking the scope. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(downloads): cancel the display-fill retry on deactivation Deactivation already cancels the poll and scope-load tasks; the retry now goes with them instead of waking later to find its scope gone. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Stacked on #597: review that first. This PR's diff is against its branch.
Problem
Season, series, and monitored downloads always came in original quality. The quality set in Settings applied only to single episodes and movies, so a season or a monitor filled the phone with full-size files even when the server could prepare smaller ones.
Solution
bulk_quality; monitors store it when the server reportsmonitor_quality. On an older server the row shows Original with a one-line reason, and the app sends what it sent before.Related issue: Silo-Server/silo-server#301
Validation tasks: changes #319 C1 and C3 (download flow and constrained storage); not run yet. No passed case is affected.
Validation
xcodebuild test, schemeSilo, iOS 27 simulator: the download suites on this commit; the fullSiloTestssuite on the tip of the stack (2,452 tests, 0 failures, 2 skipped). New tests cover the capability flags (absent, present, and in the cached copy), the batch and monitor request bodies, and when an existing monitor counts as matching a request.Silo,SiloTVincluding its test bundle, andSiloMac.Risks and follow-up
AI Disclosure
🤖 Generated with Claude Code
Note
Add quality selection for season downloads and auto-download monitors
Users can now pick a download quality preset for one-time season and series downloads, and for auto-download monitors, in SeriesDownloadSheet.swift.
bulkQualityandmonitorQualitycapability flags; unsupported servers get the original quality and no quality field on monitor requests (DownloadModels.swift).DownloadManager.downloadSeason,downloadSeries, and monitor create/update requests accept a quality argument, gated by the new capabilities (DownloadManager.swift).bulkQualitycapability is absent; older cached capability records decode the new flags as false.Macroscope summarized 2fe2d30.