Skip to content

fix: parse em dash episode ranges like "(1—5)" - #78

Open
a1d4r wants to merge 1 commit into
AIOStreams:mainfrom
a1d4r:fix/em-dash-episode-range
Open

a1d4r wants to merge 1 commit into
AIOStreams:mainfrom
a1d4r:fix/em-dash-episode-range

Conversation

@a1d4r

@a1d4r a1d4r commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

AnimeLayer writes episode ranges with an em dash: "(1—5)". The parser only knows
the hyphen and falls back to episode 1.

Title Before After
Jujutsu Kaisen: Shimetsu Kaiyuu - Zenpen / Магическая битва [ТВ-3] (1—5) [1080p] S3 E1 S3 E1-5
One Piece (1—1160) [720p] E1 E1-1160
Fullmetal Alchemist: Brotherhood / Стальной Алхимик ТВ-2 (64 из 64) + Specials (1—4) Complete E1-64 E1-64 (unchanged)
Сериал / Show (2005—2006) [1080p] — — (year range)

Fix: a handler for "(A—B)" / "(A–B)" in parentheses, placed late (just before
the fallback). It is not used after "Special(s)/OVA/ONA/SP", and year ranges are
skipped.

Tests: src/tests/emDashEpisodeRange.test.ts. 6 of 3,574 labelled
releases fixed, no regressions; 11 of 37k titles change.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@a1d4r
a1d4r force-pushed the fix/em-dash-episode-range branch from 21e6c22 to 925e2c2 Compare November 17, 2026 16:01

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant