Length comparison fix#131
Merged
Merged
Conversation
Reject negative values via argparse type check to prevent _is_length_mismatch from always triggering audio patching.
The _render_skipped method was removed earlier, so nothing reads files_details from skipped group dicts anymore.
Narrow the type from int | None to int so mypy can verify the call. The guard is guaranteed by _is_length_mismatch returning False when either argument is None.
Filter planned items directly from plan instead of going through visible_items, which became redundant after _render_skipped removal.
Replace independent if-chains with structural pattern matching in _stream_short_details to clarify mutual exclusivity.
Define StreamType = Literal['video', 'audio', 'subtitle'] in melt_common and use it in _stream_short_details and _format_track_line signatures. Catches typos at type-check time.
Replace independent if-chains with structural pattern matching in _stream_short_details to clarify mutual exclusivity.
Move the shared stream summary function to stream_short_details in melt_common.py. Both MeltAnalyzer and MeltPlan now delegate to the single implementation, eliminating the duplicated logic.
Replace .setdefault(path, set()).add(tid) pattern with defaultdict for cleaner collection of selected stream IDs.
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.
No description provided.