fix(parse): pack titles and degenerate ranges
COMPLETE before the season tag was weak junk, so it stayed in the title and exact-title matching failed silently (#135). It now closes the boundary wherever it lands. S01-S01 produced no claim because the dash-range branch required last > season; a degenerate range is one season's pack, matching the rule match_episode lifted.
This commit is contained in:
@@ -307,6 +307,42 @@ fn cases() -> Vec<Case> {
|
||||
..NameClaims::default()
|
||||
},
|
||||
},
|
||||
Case {
|
||||
// `COMPLETE` before the tag closes the title like any strong
|
||||
// marker, wherever the group puts it.
|
||||
name: "Bluey.COMPLETE.S01.1080p.WEB-DL",
|
||||
want: NameClaims {
|
||||
title: s("Bluey"),
|
||||
resolution: Some(Resolution::P1080),
|
||||
source: Some(Source::WebDl),
|
||||
episode: Some(EpisodeClaim::Season { season: 1 }),
|
||||
..NameClaims::default()
|
||||
},
|
||||
},
|
||||
Case {
|
||||
// The trailing placement already worked; it keeps working.
|
||||
name: "Bluey.S01.COMPLETE.1080p.WEB-DL",
|
||||
want: NameClaims {
|
||||
title: s("Bluey"),
|
||||
resolution: Some(Resolution::P1080),
|
||||
source: Some(Source::WebDl),
|
||||
episode: Some(EpisodeClaim::Season { season: 1 }),
|
||||
..NameClaims::default()
|
||||
},
|
||||
},
|
||||
Case {
|
||||
// A degenerate range is one season's pack.
|
||||
name: "Fallout.S01-S01.1080p.BluRay.x264-GROUP",
|
||||
want: NameClaims {
|
||||
title: s("Fallout"),
|
||||
resolution: Some(Resolution::P1080),
|
||||
source: Some(Source::BluRay),
|
||||
codec: Some(Codec::X264),
|
||||
group: s("GROUP"),
|
||||
episode: Some(EpisodeClaim::Seasons { first: 1, last: 1 }),
|
||||
..NameClaims::default()
|
||||
},
|
||||
},
|
||||
Case {
|
||||
name: "Movie.2019.4K.HDR.DV.2160p.BDRemux.Ita.Eng.x265-NAHOM",
|
||||
want: NameClaims {
|
||||
|
||||
Reference in New Issue
Block a user