Skip to content

fix: parse Russian episode counts ("24 серии из 24", "полный (10)", "[16/16]") as episode ranges - #73

Open
a1d4r wants to merge 1 commit into
AIOStreams:mainfrom
a1d4r:fix/ru-episode-count
Open

a1d4r wants to merge 1 commit into
AIOStreams:mainfrom
a1d4r:fix/ru-episode-count

Conversation

@a1d4r

@a1d4r a1d4r commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Russian trackers often give how many episodes a pack holds instead of a range.
The parser takes the count as an episode number, so a full season is only
matched for its last episode.

Title Before After
Остаться в живых (2 сезон: 24 серии из 24) / Lost / 2005-2006 / ДБ (Первый канал), СТ / BDRip S2 E24 S2 E1-24
Компьютершики (1-3 сезоны: 18 серий из 18) / The IT Crowd / 2006-2008 / ПО / DVDRip S1-3 E18 S1-3 E1-18
Реинкарнация безработного (1 сезон. Часть 2: 12 серий + Бонус) / Mushoku Tensei … / 2021 S1 E12 S1 E1-12
Секретные материалы (8 выпусков из 8) [2022, …, SATRip] E8 E1-8
Игра престолов / Game of Thrones (Сезон 2 полный (10)) (2012) WEB-DL 720p (LostFilm) S2 E10 S2 E1-10
Доктор Хаус / House M.D. / Сезон: 7 / Полный (23) [2010, …] S7 E23 S7 E1-23
Грэвити Фоллс / Gravity Falls / Сезон: 2 / Серии: 14 из ? (…) [2014, …] S2 E14 S2 E1-14
Потомки солнца / Descendants Of The Sun [16/16] [2016] E16 E1-16
Чужестранка / Outlander [08х02 из 10] (2026) WEB-DL 1080p | ColdFilm S8 E1-2 S8 E2
Мистер Бин (Диск 3 из 6) / Mr. Bean (…) [2003, …, DVD5] E1-3 —

Fix:

  • "K серий/серии/выпусков/эпизодов из N" and the plural "K серий" alone (that
    form is always a count) -> 1..K. Not after a range ("5-10 серии из 10" stays
    5-10), not after "из" ("серия 5 из 16 серий" is not 1-16), not for 0 ("0
    серии из 12" stays episode 0);
  • "полный (K)" -> 1..K;
  • "[K/K]" with equal numbers -> 1..K ("[3/9]" is left alone);
  • "K из ?" -> 1..K;
  • the existing "K из N" handler skips "08х02 из 10" (one episode of a season)
    and "Диск 3 из 6" / "Disc 3 of 6".

The count handlers keep only the number as the match (matchGroup), so a count
does not start an episode title.

Tests: src/tests/russianEpisodeCount.test.ts. 43 of 3,574 labelled
releases fixed, no regressions. 235 of 37k titles change, all of them
Cyrillic; 6 titles change from "Мистер Бин Диск" to "Mr. Bean".

…[16/16]") as episode ranges

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@a1d4r
a1d4r force-pushed the fix/ru-episode-count branch from a688a51 to 2f6a317 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