diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-08-29 15:12:32 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-08-29 15:12:32 +0200 |
| commit | 5a88f8d7a0a35b0c75b0a56d0f6fce1d0a495c12 (patch) | |
| tree | cbc0a8207885476cd0d331db399536c259ca4f80 /packages/meshbay-node/tests/test_title_parse.py | |
| parent | be57cf9c3b499c8e59a94d13059f16f1456fcae1 (diff) | |
| parent | 71b7a310ce938f072fe20f27eeeadd40685f1ad1 (diff) | |
| download | meshbay-5a88f8d7a0a35b0c75b0a56d0f6fce1d0a495c12.tar.gz | |
Merge branch 'fix/videos-tmdb-matching'
Diffstat (limited to 'packages/meshbay-node/tests/test_title_parse.py')
| -rw-r--r-- | packages/meshbay-node/tests/test_title_parse.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/meshbay-node/tests/test_title_parse.py b/packages/meshbay-node/tests/test_title_parse.py index 5f0977c..03fb588 100644 --- a/packages/meshbay-node/tests/test_title_parse.py +++ b/packages/meshbay-node/tests/test_title_parse.py @@ -69,6 +69,26 @@ def test_sequel_variants_empty_when_no_trailing_digit(): assert sequel_variants("Some Movie") == [] +# ── bug 2026-08-29: guessit peels "Volume N" off the title ───────────────── + +def test_movie_volume_number_is_folded_back_into_the_title(): + # guessit parses both to title="Some Saga" + volume=1/2; leaving it that + # way collapsed the two parts onto one TMDB match and made "Fix match" + # (grouped by display_title) unable to separate them. + r1 = parse_movie_filename("Some.Saga.Volume.1.2003.mkv") + r2 = parse_movie_filename("Some.Saga.Volume.2.2004.mkv") + assert r1.display_title == "Some Saga 1" + assert r2.display_title == "Some Saga 2" + assert r1.display_title != r2.display_title + assert r1.year == 2003 and r2.year == 2004 + + +def test_movie_without_a_volume_token_is_unchanged(): + # the "3" is already part of guessit's title here, not a volume field + r = parse_movie_filename("Old.Frontier.3.2001.mkv") + assert r.display_title == "Old Frontier 3" + + # ── §3.3 row 6: no usable title at all ─────────────────────────────────────── def test_low_confidence_when_no_title_or_year(): |