Refactor track management to use TrackIntent model#91
Merged
Conversation
- replace the legacy TrackConfiguration/FileTrackConfiguration/FileTrackValues split with a single TrackIntent model owned per batch track slot - remove duplicated mutable per-file track state and treat scanned files as the source of truth for per-file availability and ordering - add ScannedFileInfo.GetTracks(TrackType) so initialization, rule evaluation, and mkvpropedit argument generation share one canonical ordered track lookup path - replace TrackConfigurationFactory with TrackIntentFactory and update dependency registration to build TrackIntent instances directly from scanned metadata - simplify BatchConfiguration by exposing only global TrackIntent collections and removing file-configuration migration/indexing code that belonged to the old model - keep the design centered on batch intent rather than per-file mirrored state: the batch owns the desired values and ShouldModify* flags, while each file contributes only scanned metadata and track presence - preserve uneven track-count support by treating TrackIntent.Index as the stable global slot and skipping missing tracks at resolution time instead of maintaining placeholder per-file config objects - make command generation more direct and predictable by reading mkvpropedit output straight from TrackIntent values and resolving file applicability from scanned tracks on demand - separate stable batch intent from scanned per-file metadata so future resolution strategies can evolve without reintroducing mirrored mutable state - keep today’s model intentionally simple while leaving room for later policy layers, smarter defaulting, per-file override strategies, or more advanced track-resolution logic - update naming, default, forced, and language rules to derive values from the current batch file set through canonical scanned track lookup - normalize language aggregation through ILanguageProvider and ISO 639-2/B grouping so aliases such as en/eng are counted as the same language - simplify track view models and XAML bindings to edit TrackIntent directly instead of synchronizing separate global and per-file models - remove obsolete TrackPositionRule and legacy-model tests that only existed to support the old architecture - fix the import-time derived-default regression introduced by the refactor by adding scanned files to the batch before InitializeTrackConfigStage applies aggregate rules - add orchestrator regression coverage for both the pipeline order and the real import behavior so derived defaults are verified against all files imported in the same run - add focused tests for TrackIntentFactory, ScannedFileInfo ordered track lookup, mkvpropedit argument generation, normalized language defaulting, and stale refresh replacement behavior - refresh assistant/project metadata to document the TrackIntent architecture and the current track-configuration flow
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.
Adopt a unified TrackIntent model for batch processing, simplifying track state management and enhancing metadata handling. This change removes legacy configurations, streamlines initialization, and improves the overall architecture for future enhancements. Focused tests ensure the integrity of the new implementation.