Recognize season-pack titles beyond the literal "(S?N Complete)" shape
SEASON_PACK_RE only matched an explicit parenthesized "(S01 Complete)"
form, so any other real-world season-pack naming convention — bare
"S10.COMPLETE", spelled-out "Season 8 Complete", "[Season 4 Four
Complete]", or no "Complete" marker at all ("Game of Thrones - Season 8
S08 - 2019") — came back with season = None entirely, not just an
unresolved episode. That fed straight into review-queue approvals
returning "could not resolve which episode this release is" for releases
that were genuine, resolvable season packs. Broadened to a bare season
marker, safe here since this is only reached after SXXEXX_RE/SXX_DASH_EP_RE
have already failed to find a real episode number.
This commit is contained in:
parent
6e7be67f0b
commit
d1909f3083
2 changed files with 42 additions and 1 deletions
|
|
@ -181,6 +181,34 @@ mod tests {
|
|||
assert_eq!(p.resolution, Some(1080));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parses_season_pack_shapes_without_literal_parens() {
|
||||
// Real review-queue entries that all failed to resolve at all
|
||||
// before this fix — season came back None, not just unmatched
|
||||
// episode — because SEASON_PACK_RE required a literal
|
||||
// "(S?N Complete)" shape.
|
||||
assert_eq!(
|
||||
parse("Modern.Family.S10.COMPLETE.720p.AMZN.WEBRip.x264-GalaxyTV").season,
|
||||
Some(10)
|
||||
);
|
||||
assert_eq!(
|
||||
parse("Modern Family 2009 Season 8 Complete 720p AMZN WEBRip x264 [i_c]").season,
|
||||
Some(8)
|
||||
);
|
||||
assert_eq!(
|
||||
parse("Red.Dwarf.S04.1080p.BluRay.x264-LATENCY [Season 4 Four Complete]").season,
|
||||
Some(4)
|
||||
);
|
||||
assert_eq!(
|
||||
parse("Red.Dwarf.S11.1080p.BluRay.x264-SHORTBREHD [Season 11 Eleven]").season,
|
||||
Some(11)
|
||||
);
|
||||
assert_eq!(
|
||||
parse("Game of Thrones - Season 8 S08 - 2019 1080p Bluray AAC5.1 x264-R").season,
|
||||
Some(8)
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parses_yameii_dash_sxxexx_with_english_dub_tag() {
|
||||
let p = parse("[Yameii] Ascendance of a Bookworm - S04E11 [English Dub] [CR WEB-DL 1080p H264 AAC] [8ACE7B72] (Honzuki no Gekokujou)");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue