Repository navigation
feat(app): pick a stream's quality in the add sheet - #588
Conversation
…t AES-128 HLS - HLS variants and DASH video representations resolve as a single choice (FileSelectionMode.SINGLE), best first with video before audio-only; a selection made while downloading restarts with that variant - Separate fragmented MP4 audio (an HLS AUDIO rendition, the main DASH audio adaptation set) is merged with the video into one MP4 by rewriting box headers, fragments interleaved by start time - AES-128 HLS segments are decrypted as they arrive with a pure Kotlin AES-128-CBC decryptor; SAMPLE-AES and other DRM stay refused - The add sheet downloads the best variant instead of offering stream variants as torrent-style checkboxes - Real ffmpeg fixtures (DASH with separate tracks, encrypted HLS fMP4 with a separate audio rendition) back an end-to-end integration test
…ep boxes before mdat - Variant IDs are hashes of each variant's manifest identity rather than positions, so a refreshed or re-signed manifest cannot map a resumed task's chosen ID to another quality - A variant whose container differs from the output name Ketch chose fails instead of writing TS bytes under .mp4; a file destination the user named is left alone - Boxes between a moof and its mdat are kept, as trun data offsets count them - HLS IVs of any width up to 32 hex digits are left-padded, per RFC 8216
- The preview card of a single HLS master or DASH manifest lists its variants (IntakeEntry.variants, best first) as Quality radio buttons, the first checked - The request names the chosen variant in selectedFileIds, and nothing when it is the default, so older devices keep downloading the best - New intake_quality string in every language; IntakeStateTest and an intake-stream snapshot cover it
…ia-formats # Conflicts: # AGENTS.md
…take-quality-picker
…ia-formats # Conflicts: # AGENTS.md
…icker # Conflicts: # AGENTS.md # app/shared/src/commonMain/kotlin/com/linroid/ketch/app/state/IntakeState.kt # app/shared/src/commonTest/kotlin/com/linroid/ketch/app/state/IntakeStateTest.kt # docs/media.md
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. |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0dd3eab8cd
ℹ️ 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".
…ly where file selection works and apply them on retry
Test Results 2 116 files 2 144 suites 44m 21s ⏱️ Results for commit dd68348. |
Summary
IntakeEntry.variants, best first, such as "1080p · 5.1 Mbps"). The first variant is selected by default.selectedFileIds. When the choice is the first variant it sends nothing, so the source picks its own default, the best. A chosen ID the source no longer lists falls back to the first.intake_qualitystring, translated into every language.AGENTS.mdanddocs/media.mdnow say the quality can be picked in the add sheet, or later in the inspector's Files tab.Batches and ranges still download the best quality; only the single-link preview offers the choice.
Known limitation: the app can't tell a variant's container before the download starts. If the best variant is fragmented MP4 and the user picks a TS variant, the download fails with the source's "add it again" error, unless the user typed a file name in the sheet.
Snapshots
Testing
IntakeStateTest: covers the default best variant (empty selection), a chosen variant being sent, re-picking the best, an unlisted ID falling back, and a stream with one variant showing no choiceDesignTokenUsageTest,LocalizationResourcesTest,HardcodedTextTestintake-streamscenario:./gradlew :app:shared:jvmTest -Psnapshots --tests '*IntakeSheetSnapshots.stream*'