Skip to content

Spurious season/episode numbers: title digits, absolute-number-in-parens, and 'Season N - EE' read as a range #875

Description

@Toilal

Summary

A number that is not the season/episode — a digit that is part of the title, an absolute episode number repeated in parentheses, a stray year, or a release-group id — gets captured as a season/episode, usually producing a spurious multi-value list (or a wrong scalar). Surfaced by the cross-parser test corpus (#873); ~15+ release names are affected, concentrated in anime-style names.

Patterns & examples

1. A number inside the title is captured as an episode

Release name Expected guessit today
Mob Psycho 100 - 09 [1080p].mkv episode=9 episode=[100, 9]
Space Battleship Yamato 2199 (2012) episode 18 episode=18 season=2012, episode=[2199, 18]
[Golumpa] Star Blazers 2202 - 22 (… Yamato 2022) … episode=22 episode=[2202, 22]
[SubsPlease] Fairy Tail - 100 Years Quest - 05 (1080p) episode=5 episode=[100, 5]

2. Absolute episode number in parentheses double-counted

Release name Expected guessit today
[Hatsuyuki-Kaitou]_Fairy_Tail_2_-_52_(227)_… episode=52 episode=[52, 227]
[Hatsuyuki] Dragon Ball Kai (2014) - 002 (100) … episode=2 episode=[2, 100]
[Deep] Tegami Bachi (REVERSE) - Letter Bee - 29 (04) … episode=4 episode=[29, 4]

3. Season N - EE read as a season range N..EE

Release name Expected guessit today
[SCY] Attack on Titan Season 3 - 11 (BD 1080p …) season=3, episode=11 season=[3, 4, 5, 6, 7, 8, 9, 10, 11]
[Erai-raws] Granblue Fantasy … Season 2 - 08 … season=2, episode=8 season=[2, 3, 4, 5, 6, 7, 8]
[HR] Boku no Hero Academia 87 (S4-24) … season=4 season=[4, 5, …, 24]

4. Release-group id captured as episode

Release name Expected guessit today
[0x539] Somali and the Forest Spirit - S01E01 (WEB 1080p …) season=1, episode=1 episode=539

Notes / scope

  • Common thread: when a single season/episode is already anchored (e.g. - 09, S01E01, Season 3 - 11), a second numeric token nearby — title digits, an absolute number in (), a year, or a bracketed id — should not be merged into the season/episode list.
  • Pattern 1080p screensize #3 looks like Season <n> - <ee> being interpreted as a season range <n>..<ee>; the <ee> after the dash is the episode, not a season bound.
  • Pattern Part III & VI issue #4: a leading [0x539]-style group tag should be treated as a release group / id, not an episode.
  • Logic lives in guessit/rules/properties/episodes.py (number extraction, ranges) and the group/title markers.

Reproduce / verify

These are part of the cross-parser corpus; run the opt-in suite and inspect the manifest:

uv run pytest -m cross_parser

Affected names are listed under season/episode in guessit/test/cross_parser/baseline.json. As the false numbers stop being captured, those entries should drop out on the next python scripts/import_cross_parser_tests.py run.

Acceptance criteria

  • A title-internal number (Mob Psycho 100, Yamato 2199, Star Blazers 2202) is not added to episode.
  • Season N - EE yields season=N, episode=EE (not a season range).
  • An absolute episode in () after the main number (52 (227)) does not create a 2-value episode list.
  • A leading [0x539]-style group tag is not parsed as an episode.
  • No regression on the English corpus (episodes.yml).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions