Skip to content

feat(downloads): choose a quality for season downloads and monitors - #598

Merged
Quick104 merged 12 commits into
feat/auto-downloads-overviewfrom
feat/download-quality-picker
Oct 4, 2026
Merged

Quick104 merged 12 commits into
feat/auto-downloads-overviewfrom
feat/download-quality-picker

Conversation

@Quick104

@Quick104 Quick104 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

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

  • The series Download sheet has a Quality row on both tabs. It starts at the quality set in Settings and lists the presets the server offers, labelled with their resolution ceiling ("10 Mbps · up to 1080p"). An existing monitor opens with its own quality, and a stored quality the server no longer offers stays selectable instead of blanking the menu.
  • Season and series downloads send the chosen quality when the server reports bulk_quality; monitors store it when the server reports monitor_quality. On an older server the row shows Original with a one-line reason, and the app sends what it sent before.
  • A monitor's quality is sent only when it changes. The server re-checks transcode permission for any quality it receives, so resending an unchanged one could block other edits after that permission is revoked.
  • A monitor at a lower quality shows it in the Monitored list ("Future episodes · 5 Mbps").

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, scheme Silo, iOS 27 simulator: the download suites on this commit; the full SiloTests suite 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.
  • Builds: Silo, SiloTV including its test bundle, and SiloMac.
  • Manual runs:

Risks and follow-up

AI Disclosure

  • Harness: Claude Code (Claude Agent SDK) in T3 Code
  • Tool(s): Claude Code, including its review subagent; agent-device for simulator input
  • Model(s): claude-opus-5-5[1m]
  • Involvement: AI-assisted
  • Adversarial review: the review agent described in feat(downloads): show monitored series and simplify the series Download sheet #597 found that creating a monitor the server already had could resend an unchanged quality in its follow-up edit; fixed here.

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

  • Servers advertise bulkQuality and monitorQuality capability 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).
  • Adds a display-only manifest fill pass that populates titles and artwork for preparing entries without touching transfer metadata.
  • Download rows show preparation progress as a status line and circular ring (DownloadManagerRows.swift).
  • Behavioral Change: monitor matching now treats a different quality as a non-match, and batch requests force Original quality when bulkQuality capability is absent; older cached capability records decode the new flags as false.

Macroscope summarized 2fe2d30.

- 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]>
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ecc8bf62-e6d5-417b-b6ae-11004421d9ab

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-04T17:40:12.684748Z 2fe2d30 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment on lines +118 to 121
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 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Quick104 and others added 2 commits October 4, 2026 13:02
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]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Quick104 and others added 2 commits October 4, 2026 13:08
…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]>
@Quick104
Quick104 merged commit 3f345d2 into feat/auto-downloads-overview Oct 4, 2026
6 checks passed
@Quick104
Quick104 deleted the feat/download-quality-picker branch October 4, 2026 17:37
Quick104 added a commit that referenced this pull request Oct 4, 2026
…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]>
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.

1 participant