Commit Graph

9 Commits

Author SHA1 Message Date
Estrella Pan
90239b0843 fix(parser): stop destroying titles without a [group] prefix (#1025)
prefix_process called re.sub(f".{group}.", "", raw) unconditionally. When
group was empty (torrents that don't start with [group]), the pattern
degenerated to ".." and every pair of characters in the title was deleted,
leaving a stub the downstream splitter couldn't turn into title_en/zh/jp.

Guarded the substitution with `if group:`. Titles like
"冰之城墙「氷の城壁」The Ramparts of Ice S01E02 1080p 日英双语-多国字幕"
and "Girls Band Cry S01E05 ..." now parse correctly. Updated #764's test
which had been pinned to the broken behavior.

Closes #1025
2026-04-19 13:00:35 +02:00
Estrella Pan
ead16ba4cf feat(parser): add fallback episode parser for TITLE_RE failures (#876, #910, #773)
Add _fallback_parse() tried when TITLE_RE.match() returns None, using two
regex patterns to extract episode numbers from formats the main regex misses:
- digits before [ bracket (issues #876, #910)
- compound [02(57)] format (issue #773)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:12:24 +01:00
Estrella Pan
9d4bd48ce5 test(parser): expand coverage for raw, torrent, and path parsers
Add 13 new test cases across three parser test files:
- raw_parser: Chinese 第二季, 2160p resolution, bracketed Season N, multi-group with Chinese punctuation, English-only title
- torrent_parser: EP format, tc/zh-tw subtitle, no-language subtitle (ValidationError), multi-level path, [NNvN] version suffix
- path_parser: season=2/no-offset, large positive offset, offset yielding exactly Season 1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 20:48:53 +01:00
Jeremy-Hibiki
89f0754d69 fix: fix multi-line title post-processing in raw_parser
close #679, #794
related pr #685
2024-07-14 17:47:41 +08:00
EstrellaXD
b63a08a5b3 fix: parser error. 2023-10-05 15:02:35 +08:00
EstrellaXD
a0b6af3117 fix: poster link update bug. 2023-09-28 16:56:37 +08:00
EstrellaXD
a4f1bbd15f feat: update searcher 2023-09-28 16:04:52 +08:00
100gle
e336fd7402 chore: style with black 2023-06-13 22:15:52 +08:00
zthxxx
069a86faa0 chore: move Auto_Bangumi/src -> Auto_Bangumi/backend/src, prepare for merge WebUI repo 2023-06-06 22:33:00 +08:00