fix: fail cleanly on empty manual track selection (closes #173) - #186
Merged
Conversation
negativeeddy
commented
Sep 5, 2026
negativeeddy
left a comment
Owner
Author
There was a problem hiding this comment.
Reviewed and approved. The fix matches the issue's proposed fix: the API rejects empty selections (job stays parked for correction), the pipeline fails cleanly with a clear 'No tracks selected' message as a defensive guard, and the UI alerts client-side. Build passes (0 warnings/errors); all tests pass (Core 294, WebUi 80) including two new regression tests. Ready for merge.
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.
Automated Fix
Fixes #173
Problem
Deselecting all tracks in Manual Selection mode submits
ManualSelectionTrackNumbers = "[]"(a non-empty string), so the apply block runs, sets everyProcess=false, and the rip loop has zero eligible tracks. The post-rip check then throws the confusing "MakeMKV rip produced no ripped tracks" error and the job fails.Changes
ApiController.SubmitManualSelection): reject an emptytrackNumbersarray with a clear error. The job stays parked inManualSelectionStartedso the user can correct the selection and resubmit (or cancel the job).ArmRipperService): defensive check — if an empty selection somehow reaches the pipeline, fail the job cleanly with "No tracks selected" instead of the confusing downstream error.JobDetail.cshtml): client-side guard insubmitManualSelection()that alerts immediately when no tracks are checked, avoiding a round-trip.Testing
ManualSelection_EmptySelection_FailsJobCleanly(pipeline fails cleanly, no rip runs)SubmitManualSelection_EmptySelection_RejectsAndKeepsJobWaiting(API rejects, job stays waiting)