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

Closes #1265
pull/5007/head
Mark McDowall 3 years ago
parent cc9fc1e3c3
commit 8f2c4fe4d1

@ -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();
}
}
}

@ -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

Loading…
Cancel
Save