From f88a83ae10530fd2a7606a06ff999dda250ec72d Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 26 Mar 2014 07:21:02 -0700 Subject: [PATCH] Better cleaning before parsing releases and files --- src/NzbDrone.Core.Test/ParserTests/SeasonParserFixture.cs | 1 + src/NzbDrone.Core/Parser/Parser.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/SeasonParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/SeasonParserFixture.cs index 2655f9d6e..6789bc48b 100644 --- a/src/NzbDrone.Core.Test/ParserTests/SeasonParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/SeasonParserFixture.cs @@ -24,6 +24,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("The Office Season4 WS PDTV XviD FUtV", "The Office", 4)] [TestCase("Eureka S 01 720p WEB DL DD 5 1 h264 TjHD", "Eureka", 1)] [TestCase("Doctor Who Confidential Season 3", "Doctor Who Confidential", 3)] + [TestCase("Fleming.S01.720p.WEBDL.DD5.1.H.264-NTb", "Fleming", 1)] public void should_parsefull_season_release(string postTitle, string title, int season) { var result = Parser.Parser.ParseTitle(postTitle); diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 883b7af97..994f5df91 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -102,7 +102,7 @@ namespace NzbDrone.Core.Parser private static readonly Regex NormalizeRegex = new Regex(@"((?:\b|_)(?|\?|\*|\:|\|", + private static readonly Regex SimpleTitleRegex = new Regex(@"480[i|p]|720[i|p]|1080[i|p]|[xh][\W_]?264|DD\W?5\W1|\<|\>|\?|\*|\:|\|", RegexOptions.IgnoreCase | RegexOptions.Compiled); private static readonly Regex MultiPartCleanupRegex = new Regex(@"\(\d+\)$", RegexOptions.Compiled);