fix: exclude nav playlists from specials, add disc2/3/6/7 test coverage#18
Merged
fix: exclude nav playlists from specials, add disc2/3/6/7 test coverage#18
Conversation
…verage Playlists referenced by first_playback or top_menu movie objects are navigation content (disc intro, menu background), not special features. Exclude them from classification-based special detection. - Add _nav_playlists_from_hints() to identify first_playback/top_menu playlists and filter them in _special_features_from_classifications() - Add disc2 META/DL/bdmt_eng.xml fixture for disc title extraction - Add disc2 tests: no specials, disc title matches expected value - Add disc2 to specials visibility matrix (0 total, 0 visible) - Add disc_title extraction matrix test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add test_disc3_no_special_features to test_disc3_scan.py - Add disc3 to specials visibility matrix (0 total, 0 visible) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add disc6 META/DL/bdmt_eng.xml fixture for disc title extraction - Add test_disc6_disc_title assertion - Add disc6 to disc_title extraction matrix - Document disc6 structure in module docstring: 2 unique episodes (clip 00006 x4 stream variants + clip 00007), 3 specials are the remaining audio/subtitle variants Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
3cb8733 to
3238f73
Compare
Per AGENTS.md fixture guidelines: do not include disc titles or other identifying information that ties fixtures to specific copyrighted works. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add disc7 fixture from a two-episode OVA disc (vol 2 of box set): - 2 episodes: ep1 (59min, 4 scenes), ep2 (60min, 4 scenes) - 2 specials: stream variants of same clip (TrueHD vs AC-3) - Play-all playlist (00002.mpls) with both episodes + outro - Generic disc title via META/DL/bdmt_eng.xml Tests: episode count, ordering, scene counts, durations, special count/durations, disc title, play-all classification. Matrix entries for episodes, specials, segments, chapter-split, title. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Fix navigation playlists being incorrectly classified as special features, add disc7 fixture from a two-episode OVA disc, strengthen test expectations across disc2/3/6/7, and ensure all fixture disc titles use generic names per copyright guidelines.
Background
Disc2 and disc3 have short navigation playlists (00000.mpls used as disc intro) referenced by first_playback/top_menu movie objects. These were incorrectly detected as special features by the classification fallback path. Additionally, several discs lacked test coverage for episode counts, scene breakdowns, special feature expectations, and disc title extraction.
Changes
Bug fix
bdpl/analyze/__init__.py: Add_nav_playlists_from_hints()helper that identifies playlists used by first_playback/top_menu movie objects; exclude them in_special_features_from_classifications()Disc7 fixture (new)
tests/fixtures/disc7/: Two-episode OVA disc (vol 2 of box set) — 7 MPLS, 10 CLPI, index.bdmv, MovieObject.bdmv, META/DL/bdmt_eng.xmltests/test_disc7_scan.py: Integration tests — episode count/ordering, scene counts (4 each), durations, special count (2 stream variants), disc title, play-all classificationtests/conftest.py: Add disc7_path and disc7_analysis fixturesTest coverage improvements
tests/test_disc2_scan.py: Addtest_no_special_featuresandtest_disc_titletests/test_disc3_scan.py: Addtest_disc3_no_special_featurestests/test_disc6_scan.py: Addtest_disc6_disc_title, improve docstring documenting 2-episode structuretests/test_disc_matrix.py: Add disc2, disc3, disc7 to specials matrix; add disc7 to all matrices; add disc_title extraction matrixFixture cleanup
tests/fixtures/disc2/META/DL/bdmt_eng.xml: New, generic titletests/fixtures/disc6/META/DL/bdmt_eng.xml: Replaced copyrighted title with generictests/fixtures/disc7/META/DL/bdmt_eng.xml: New, generic titleTesting
ruff check .— all checks passedpytest -q— 154 tests passedAdditional Notes