Fixed: Don't parse part # in brackets as mini series style naming

Closes #1265
This commit is contained in:
Mark McDowall 2022-04-29 00:10:42 -07:00
parent cc9fc1e3c3
commit 8f2c4fe4d1
2 changed files with 7 additions and 1 deletions

View File

@ -99,5 +99,11 @@ namespace NzbDrone.Core.Test.ParserTests
{
Parser.Parser.ParseTitle(fileName).Should().BeNull();
}
[TestCase("Specials/Series - Episode Title (part 1)")]
public void should_not_parse_special_with_part_number(string fileName)
{
Parser.Parser.ParseTitle(fileName).Should().BeNull();
}
}
}

View File

@ -193,7 +193,7 @@ namespace NzbDrone.Core.Parser
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Mini-Series, treated as season 1, episodes are labelled as Part01, Part 01, Part.1
new Regex(@"^(?<title>.+?)(?:\W+(?:(?:Part\W?|(?<!\d+\W+)e)(?<episode>\d{1,2}(?!\d+)))+)",
new Regex(@"^(?<title>.+?)(?:\W+(?:(?:(?<!\()Part\W?|(?<!\d+\W+)e)(?<episode>\d{1,2}(?!\d+|\))))+)",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Mini-Series, treated as season 1, episodes are labelled as Part One/Two/Three/...Nine, Part.One, Part_One