From 7a11dfd34857c95bb614b10ae72ed28191651af0 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 26 Aug 2011 21:37:24 -0700 Subject: [PATCH] Additional removals for SimpleTitleRegex added to get rid of extraneous numbers. --- NzbDrone.Core/Parser.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/NzbDrone.Core/Parser.cs b/NzbDrone.Core/Parser.cs index 797b79123..1944dff26 100644 --- a/NzbDrone.Core/Parser.cs +++ b/NzbDrone.Core/Parser.cs @@ -44,14 +44,14 @@ namespace NzbDrone.Core RegexOptions.IgnoreCase | RegexOptions.Compiled), //Supports Season only releases - new Regex(@"^(?.*?)\W(?:S|Season\W?)?(?<season>\d{1,2}(?!\d+))+\W?(?!\\)", + new Regex(@"^(?<title>.+?)\W(?:S|Season)\W?(?<season>\d{1,2}(?!\d+))+\W?(?!\\)", RegexOptions.IgnoreCase | RegexOptions.Compiled) }; private static readonly Regex NormalizeRegex = new Regex(@"((^|\W)(a|an|the|and|or|of)($|\W))|\W|(?:(?<=[^0-9]+)|\b)(?!(?:19\d{2}|20\d{2}))\d+(?=[^0-9ip]+|\b)", RegexOptions.IgnoreCase | RegexOptions.Compiled); - private static readonly Regex SimpleTitleRegex = new Regex(@"480[i|p]|720[i|p]|1080[i|p]|[x|h]264|\<|\>|\?|\*|\:|\||""", + private static readonly Regex SimpleTitleRegex = new Regex(@"480[i|p]|720[i|p]|1080[i|p]|[x|h|x\s|h\s]264|DD\W?5\W1|\<|\>|\?|\*|\:|\||""", RegexOptions.IgnoreCase | RegexOptions.Compiled); @@ -129,6 +129,11 @@ namespace NzbDrone.Core parsedEpisode.EpisodeNumbers.Add(i); } } + + else + { + parsedEpisode.FullSeason = true; + } } }