Repository navigation
Add optional maximum title length setting - #32
Open
shaunmower wants to merge 9 commits into
Open
shaunmower wants to merge 9 commits into
shaunmower wants to merge 9 commits into
Conversation
This branch has not been deployed
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.
Description
Adds an optional
ripping.max_title_length_minutessetting that skips titles longer than N minutes. It is useful for TV discs, where a "play all" title is longer than any episode.rip_all_titles: true, every title at or below the limit is ripped. Each one is a separatemakemkvconcall, run one after another.rip_all_titles: false, the longest title at or below the limit is ripped.The default
config.yamlincludes the setting commented out (# max_title_length_minutes: 60), so the limit is off unless you turn it on.The setting is also on the web UI config page as a number field. If you leave the field empty and save, the line is commented out in
config.yaml. If you enter a value later, the line is uncommented again.Type of Change
Testing
Unit tests added for:
AppConfig.maxTitleLengthMinutesgetFileNumbers()with rip-all on and offgetDiscFileInfo()returningfileNumberswhen a limit is setgetCompleteDiscInfo()dropping skipped discsripSingleDisc()running one command per selected titleThere is no test file for
api.routes.js. I checked the YAML update logic separately by setting a value, clearing it and setting it again.npx vitest run: 400 of 401 tests pass. The failing test isnative-optical-drive.test.js > should validate drive letter parameter, which also fails onmasterwithout this change.General Testing
npm start)Web UI Testing (if applicable)
npm run web)Test Configuration:
Documentation
Checklist
Additional Context
When several titles are ripped from one disc, their output is joined before the "Copy complete" check. As a result, the disc counts as successful if any one title reports "Copy complete". I can change this to check each title separately if you prefer.
This PR and #31 both add an
[Unreleased]section to CHANGELOG.md, so whichever is merged second will have a small, easy conflict to resolve.