Fixed 1101 and 101 naming incorrectly picking up 1080p and 720p.

pull/3113/head
Mark McDowall 13 years ago
parent d97a1d068c
commit 5012144c13

@ -281,6 +281,8 @@ namespace NzbDrone.Core.Test
[TestCase("Chuck - 4x05 - Title", "Chuck")]
[TestCase("Law & Order - 4x05 - Title", "laworder")]
[TestCase("This Isn't a Valid Post", "")]
[TestCase("Mad Men - Season 1 [Bluray720p]", "madmen")]
[TestCase("Mad Men - Season 1 [Bluray1080p]", "madmen")]
public void parse_series_name(string postTitle, string title)
{
var result = Parser.ParseSeriesName(postTitle);

@ -40,14 +40,14 @@ namespace NzbDrone.Core
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Supports 1103/1113 naming
new Regex(@"^(?<title>.+?)?(?:\W?(?<season>\d{2})(?<episode>\d{2}))+\W?(?!\\)",
new Regex(@"^(?<title>.+?)?(?:\W?(?<season>\d{2})(?<episode>\d{2}(?!p|i)))+\W?(?!\\)",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Supports 103/113 naming
new Regex(@"^(?<title>.+?)?(?:\W?(?<season>\d{1})(?<episode>\d{2}))+\W?(?!\\)",
new Regex(@"^(?<title>.+?)?(?:\W?(?<season>\d{1})(?<episode>\d{2}(?!p|i|\d+)))+\W?(?!\\)",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Supports Season only releases
//Supports Season only releases
new Regex(@"^(?<title>.+?)\W(?:S|Season)\W?(?<season>\d{1,2}(?!\d+))\W?(?<extras>EXTRAS|SUBPACK)?(?!\\)",
RegexOptions.IgnoreCase | RegexOptions.Compiled)
};

Loading…
Cancel
Save