Skip to content

fix: do not read the "16x9" aspect ratio as season 16 episode 9 - #90

Open
a1d4r wants to merge 2 commits into
AIOStreams:mainfrom
a1d4r:fix/aspect-ratio-not-episode
Open

a1d4r wants to merge 2 commits into
AIOStreams:mainfrom
a1d4r:fix/aspect-ratio-not-episode

Conversation

@a1d4r

@a1d4r a1d4r commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Trackers list the aspect ratio among the tags of a film: "… BDRip 1080p,
16x9]", "[FULLSCREEN / 4X3 / …]". The parser reads it as S16E9 or S4E3.

Title Before After
Сумерки. Сага. Рассвет: Часть 2 / The Twilight Saga: Breaking Dawn - Part 2 (Билл Кондон / Bill Condon) [2012, США, фэнтези, драма, мелодрама, приключения, BDRip 1080p, 16x9] Dub + UKR + … S16E9 no season or episode
Сияние / The Shining (Стэнли Кубрик / Stanley Kubrick) [1980, США, мистика, DVDRemux] [FULLSCREEN / 4X3 / ПОЛНОЕ ИЗДАНИЕ] 18X AVO, MVO, DVO, Dub + … S4E3 no season or episode
Show 16x9 Episode Title 720p HDTV S16E9 S16E9 (unchanged)
Greys.Anatomy.16x09.HDTV.x264 S16E9 S16E9 (unchanged)
Doctor Who (2005) BluRay 720p 4x3 Daleks in Manhattan S4E3 S4E3 (unchanged)

Fix: a handler removes "16x9" or "4x3" (no leading zero) when a resolution or
source tag comes earlier in the title and the ratio sits in a list of tags,
next to a comma, a slash or a bracket. Both forms are also real episodes, so a
ratio written with dots or spaces is still read as an episode:
Show.Name.720p.HDTV.16x9.Episode.Title stays S16E9, and so does
Movie.2012.BDRip.1080p.16x9.x264. The handler sits next to the existing
removers (INTERNAL|HFR, 413 Days), which departs from the 1:1 order with
handlers.go. A validateMatch on the season and episode handlers would not
work: by the time they run, the resolution and source tags are already removed
from the string.

Tests: src/tests/aspectRatio.test.ts, 1366 tests pass. 3 of 37k titles
change, all films with "4X3"; no episode changes in the 2,693 titles with
an "NxN" mark.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
a1d4r added a commit to a1d4r/AIOStreams that referenced this pull request Nov 27, 2026
Fork main of parse-torrent-title moved from 1630ef2 to 2545c48: one more
open PR, AIOStreams/release-parser#90. The "16x9" aspect ratio after a
resolution or source tag ("BDRip 1080p, 16x9") is no longer read as
season 16 episode 9, so Season Episode Matching keeps such a film.

The canary gets a title of that kind.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
a1d4r added a commit to a1d4r/AIOStreams that referenced this pull request Nov 27, 2026
Fork main of parse-torrent-title moved from 2545c48 to 2eca4f9: the second
commit of AIOStreams/release-parser#90. "16x9" is cut as an aspect ratio
only inside a tag list ("[BDRip 1080p, 16x9]"), as "4x3" already was, so
an episode like "[HDTV] Show 16x9" is S16E9 again; the Cyrillic capital
"Х" is read as the separator too.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

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