Conversation
… tracks Implements missing validation rule to check forced flag consistency across audio and subtitle tracks in batch files. - Add ForcedFlagConsistencyRule with validation logic - Add comprehensive unit tests (13 test cases) - Register rule in ServiceCollectionExtensions Resolves #67
There was a problem hiding this comment.
Pull request overview
Adds a new file-validation rule to detect inconsistent Forced flags across audio and subtitle tracks in a batch, wires it into DI, and provides unit test coverage.
Changes:
- Introduced
ForcedFlagConsistencyRuleto compare forced-flag values across files for audio/text tracks - Registered the rule in the Uno DI container
- Added a dedicated unit test suite covering key mismatch and skip scenarios
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/MatroskaBatchFlow.Core.UnitTests/Services/FileValidation/ForcedFlagConsistencyRuleTests.cs | Adds unit tests for the new forced-flag consistency validation behavior |
| src/MatroskaBatchFlow.Uno/Extensions/ServiceCollectionExtensions.cs | Registers the new validation rule in the app’s DI setup |
| src/MatroskaBatchFlow.Core/Services/FileValidation/ForcedFlagConsistencyRule.cs | Implements the new validation rule and its forced-flag comparison logic |
src/MatroskaBatchFlow.Core/Services/FileValidation/ForcedFlagConsistencyRule.cs
Show resolved
Hide resolved
src/MatroskaBatchFlow.Core/Services/FileValidation/ForcedFlagConsistencyRule.cs
Outdated
Show resolved
Hide resolved
src/MatroskaBatchFlow.Core/Services/FileValidation/ForcedFlagConsistencyRule.cs
Show resolved
Hide resolved
…first Check track count before SequenceEqual to avoid expensive comparison when counts differ. Applied to both ForcedFlagConsistencyRule and DefaultFlagConsistencyRule for consistency.
Pass resolved track settings directly to comparison methods instead of re-deriving them. This avoids building expensive flag matrices when validation is disabled (null or Off severity). Applied to both DefaultFlagConsistencyRule and ForcedFlagConsistencyRule.
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.
Implements missing validation rule to check forced flag consistency across audio and subtitle tracks in batch files.
Resolves #67