Fix: no-minlength-for-known-tracks v2 — removed SourceTitleId (wrong-track bug)#16
Merged
Conversation
added 8 commits
July 17, 2026 18:58
…ection; fix quoting
…p from job.Tracks
When the app already knows the exact track to rip (TestMode or MainFeature modes), --minlength is counterproductive — it causes MakeMKV to filter out the requested title if it's shorter than the threshold, resulting in exit code 12 and zero output. The info scan already handles min-length filtering. Also reverted unnecessary SourceTitleId parameter on RipTrackAsync — the sequential TINFO index (TrackNumber) is the correct argument for the mkv command, not the DVD VTS source title ID (field 24).
- Removed AddSourceTitleId migration (DB column not needed) - Removed SourceTitleId property from Track, DiscTrack models - Removed SourceTitleId enum value from MakeMkvModels - Removed SourceTitleId parsing from MakeMkvService (field 24 is the DVD VTS title ID, not what makemkvcon mkv expects — it uses sequential index) - Reverted NotificationHub.cs and Viewer.cshtml changes (log streaming improvements unrelated to this branch)
- Re-add SourceTitleId (TINFO field 24) to fix MakeMKV mkv command title selection: the 0-based TINFO index was causing '0' to be passed to MakeMKV's mkv command, which MakeMKV interprets as 'rip all titles' instead of 'rip title 1'. Now we pass the actual 1-based title number. - 0-track fallback: retry info scan with normal minLength before falling back to RipAllTitles, so a DiscDb-enabled exhaustive scan timeout doesn't bypass MainFeature track selection. - Add MarkStageComplete(Rip) to the 0-track fallback path. - Add yellow 'Small file' warning on completed movie files under 2GB on both the Output list and detail pages.
SourceTitleId (MakeMKV field 24) is the 1-based source title number on the disc. But MakeMKV's mkv command uses 0-based TINFO indices, so passing SourceTitleId=1 meant 'rip TINFO index 1' (the second track) instead of 'rip title 1' (the main feature). This caused every DVD to rip a short extra instead of the movie. Fully removed from: Track model, DiscTrack model, MakeMkvModels enum, GetTrackInfoAsync parsing, FinalizeTrack, CreateTrackObj, and RipTrackAsync (which now correctly passes trackNumber directly).
…artup The TranscodeSlotLimiter read MaxConcurrentTranscodes from IOptions<ArmSettings> once at DI construction time and never updated. Since the Web UI saves settings into the DB (not the YAML file), any change via the UI was silently ignored. The limiter has been rewritten as a dynamic counter+queue gate that accepts the effective maxConcurrent value from each caller. FfmpegService and HandBrakeService now resolve job.Config?.MaxConcurrentTranscodes ?? settings.Value.MaxConcurrentTranscodes and pass it to AcquireAsync, so UI-driven changes take effect immediately.
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
Resubmission of #13 (
feat/no-minlength-for-known-tracks) with the critical SourceTitleId bug fixed.What went wrong in v1
The original branch introduced
SourceTitleId(MakeMKV field 24 — the 1-based disc title number) and used it in themkvcommand. But MakeMKV'smkvcommand uses 0-based TINFO indices, so passingSourceTitleId=1meant "rip TINFO index 1" (the second track — a short extra) instead of the main movie. Every DVD ripped wrong.Quick comparison from the same disc:
mkv ... dev:/dev/sr1 0mkv ... dev:/dev/sr1 1t00.mkv(101 min movie)t01.mkv(2 min extra)What's in v2
Keeps all the good changes from v1:
minLength=0for MainFeature/test mode rips (prevents MakeMKV from filtering out the track we already identified)Removed: All
SourceTitleIdcode — models, enum, parsing, and themkvcommand usage.RipTrackAsyncpassestrackNumberdirectly as it did before.