Repository navigation
fix: parse Russian season pack notation ("N сезон (A-B серии)", "Сезоны A-B") - #66
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R4HLoJKpBFfHVFuzARX9rH
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R4HLoJKpBFfHVFuzARX9rH
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes two cases in Russian season-pack titles (common on Kinozal / RuTracker).
1.
N сезон (A-B серии)was parsed the other way roundThe episode range ended up in
seasonsand the season number inepisodes:Игра Престолов 1 сезон (1-10 серии из 10) / Game of Thrones / 2011Игра престолов (2 сезон: 1-10 серии из 10)Игра Престолов 2 сезон 1-10 серияВо все тяжкие (5 сезон: 1-16 серии из 16)The season-range handler matched singular
сезонand grabbed the range that follows it. It now skips a range that is followed by an episode word (серии/эпизоды), soСезон: 1-8is still parsed as seasons 1–8.2. Russian plural
Сезоныwasn't recognizedOnly the Ukrainian
Сезониwas matched, so the range fell through toepisodesandСезоныleaked into the title:Игра престолов / Сезоны 1-8 / Game of ThronesСезоныИгра престоловИгра престолов / Сезоны: 1-8СезоныИгра престоловИгра престолов (Сезоны 1-8: 1-73 серии из 73)Игра престолов / Сезоны 1, 2, 3[Сс]езони?→[Сс]езон[иы]?in all season-related patterns, including thevalidateNotMatchguards of the episode-range handlers.Tests
Added 9 tests to
seasons.test.tscovering both cases, plus a regression check forСезон: 1-8. The full suite passes (38 suites, 1301 tests). Existing Russian/Ukrainian and English season formats (Сезон: 2 / Серии: 1-10,Сезони 1-8,01x01-10,Season.1-8,S01-S08,S02E01) are unchanged.Context
In AIOStreams, case 1 made a request for S02E01 return the season 1 pack and drop the correct season 2 pack.