Skip to content

fix: parse Russian "[TV+Special] [A+B из C+D]" as episodes 1-A - #74

Open
a1d4r wants to merge 1 commit into
AIOStreams:mainfrom
a1d4r:fix/ru-special-sum
Open

a1d4r wants to merge 1 commit into
AIOStreams:mainfrom
a1d4r:fix/ru-special-sum

Conversation

@a1d4r

@a1d4r a1d4r commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Anime releases on Russian trackers count TV episodes and specials separately:
"[TV+Special] [25+9 из 25+9]" is 25 TV episodes plus 9 specials. The parser
reads parts of the sum ("9 из 25" -> 1-9, "12+13" -> 12,13, "4 из 64" -> 1-4).

Title Before After
Атака Титанов (ТВ-1) / Shingeki no Kyojin / Attack on Titan [TV+Special] [25+9 из 25+9] [JAP+Sub] & [25+0 из 25+9] [RUS(ext)] [2013, …] S1 E1-9 S1 E1-25
Военная хроника маленькой девочки / Youjo Senki / … [TV+Special] [12+13 из 12+14] [JAP+Sub] [2017] E12,13 E1-12
Стальной алхимик: Братство (ТВ-2) / … / Fullmetal Alchemist: Brotherhood [TV+Special] [64+4 из 64+4] [RUS(int)] [2009] S2 E1-4 S2 E1-64
… (ТВ 2, часть 1) [2023, TV+Special, 12+1 из 12+1 эп.] BDRemux 1080p E1 E1-12
Хеллсинг (ОВА) / Hellsing Ultimate [OVA+Special] [01-10+3 из 10+3] (2006-2012) BDRip 720p E1-3 E1-10
Компьютершики / The IT Crowd (1-й сезон. 6+1 доп) (…) [2006, …] S1 E6 S1 E1-6

Fix: one handler for "A+B из C+D" (and "A+B доп"), before the comma/plus list
handler. The first term numbers the episodes ("25" -> 1-25, "01-10" -> 1-10).
An airing season gives a lower bound for the total ("[1-90+0 из >115+1]"), so
an optional ">" is allowed there.
The second bracket "& [25+0 из 25+9] [RUS(ext)]" is about the dub coverage and
is never reached. Titles lose the "TV+Special 24+" tail as a side effect.

Tests: src/tests/russianSpecialsSum.test.ts. 19 of 3,574 labelled
releases fixed, no regressions; 96 of 37k titles change.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@a1d4r
a1d4r force-pushed the fix/ru-special-sum branch from 9c0564e to 92204e3 Compare November 17, 2026 16:00

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