Allow a trailing fansub revision tag in SxxExx parsing
"S01E01v2" (a fixed re-release of an episode) glued the version marker directly onto the episode number with no separator, so the word-boundary check after the digits never matched and the whole file fell through as unparsed. Verified live: some shows had zero episode files linked because every release happened to be a v2.
This commit is contained in:
parent
54818f5f05
commit
60d01657eb
2 changed files with 19 additions and 1 deletions
|
|
@ -131,6 +131,16 @@ mod tests {
|
|||
assert_eq!(p.title_normalized, "Ascendance of a Bookworm");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parses_sxxexx_with_a_trailing_fansub_revision_tag() {
|
||||
// "v2" glued directly onto the episode number ("a fixed re-release
|
||||
// of this episode") previously broke the word-boundary check
|
||||
// entirely, leaving season/episode both None.
|
||||
let p = parse("[Judas] Chainsaw Man - S01E01v2 1080p WEB-DL");
|
||||
assert_eq!(p.season, Some(1));
|
||||
assert_eq!(p.episode, Some(1));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parses_subsplease_dash_episode_with_group_and_hash() {
|
||||
let p = parse("[SubsPlease] Honzuki no Gekokujou S4 - 13 (1080p) [A4FE0990].mkv");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue