feat: add Manual Selection rip mode (pause after scan for multi-select) - #144
Merged
Conversation
added 4 commits
August 19, 2026 13:22
Add a third rip mode (Manual) alongside Main Feature and All Titles.
When enabled, the pipeline pauses after the MakeMKV title scan and
waits for the user to multi-select which tracks to rip.
Core changes:
- Add ManualSelectionStarted job state
- Add ManualSelection bool to ArmSettings, ConfigSnapshot, SystemDrive
- Add ManualSelectionResume and ManualSelectionTrackNumbers to Job
- Pipeline pauses after title scan when ManualSelection is enabled
- User selects tracks via checkboxes, clicks Continue Rip
- API endpoint POST /api/jobs/{id}/manual-selection submits selections
UI changes:
- Manual Selection toggle in Settings (Ripper tab)
- Per-drive Manual option in the drive selector dropdown
- Track table shows checkboxes when in ManualSelectionStarted state
- Select All checkbox and Continue Rip button
- SignalR live updates handle the new state
All 469 tests pass.
The previous implementation used a while(true) + Task.Delay(2s) polling loop that needlessly woke the pipeline every 2 seconds to check a DB flag. This wastes CPU and could interfere with the UI. Replace with a TaskCompletionSource<int> per job. The pipeline awaits the TCS with zero polling; the API endpoint completes it when the user submits their selection. Cancellation is handled via a linked CancellationTokenSource so job abort/shutdown also wakes the pipeline. - Add static ConcurrentDictionary<int, TaskCompletionSource> to ArmRipperService - Add SignalManualSelection / CancelManualSelection static methods - API endpoint calls SignalManualSelection after persisting selections - Remove unused ManualSelectionResume field from Job - All 469 tests pass
- Reload the job entity after the manual-selection wait so the selection persisted by the API (via a separate DbContext) is actually read; the tracked entity was stale, so the selection was silently ignored and the MainFeature branch ripped the wrong track. - Skip the MainFeature and rip-all fast-path branches when a manual selection was applied, so the individual-track branch respects the chosen Process flags. - Don't set VideoRipping before the identify guard runs — it tripped the guard and recorded a spurious stage error (yellow Identify in the UI). The guard now also accepts ManualSelectionStarted as a valid pre-rip state. - Add regression test covering selection application, branch selection, and absence of spurious stage errors.
This was referenced Sep 2, 2026
Closed
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.
Summary
Adds a third rip mode, Manual Selection, alongside the existing Main Feature and All Titles modes. In Manual mode, the pipeline pauses after the MakeMKV title scan and waits for the user to multi-select exactly which tracks to rip.
What changed
Core
JobState.ManualSelectionStarted— new state for the paused-waiting-for-selections phaseArmSettings.ManualSelection— new bool setting (defaults tofalse)ConfigSnapshot.ManualSelection— per-job snapshot of the settingSystemDrive.ManualSelection— per-drive override (null = use global)Job.ManualSelectionResume— flag to signal the pipeline to continueJob.ManualSelectionTrackNumbers— JSON array of selected track numbersPipeline
ManualSelectionis enabled, the pipeline entersManualSelectionStartedstate and polls for user input indefinitelyAPI
POST /api/jobs/{id}/manual-selection— accepts{ trackNumbers: ["1", "3", "5"] }and resumes the pipelineUI
Behavior
Closes #76
Fixes (post-review)
jobwas not reloaded after the manual-selection wait, so the selection persisted by the API (via a separate DbContext) was silently ignored and the MainFeature branch ripped the wrong track. The job is now reloaded after the wait.Processflags.VideoRippingbefore the identify guard ran, recording a false stage error (yellow Identify in the UI). The status now staysManualSelectionStartedthrough the guard, and the guard accepts that state as a valid pre-rip state.ManualSelection_AppliesUserSelection_AfterResumecovers selection application, branch selection, and absence of spurious stage errors.