diff --git a/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs index 327e4dc99..8476489c0 100644 --- a/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs @@ -19,6 +19,9 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("2 Broke Girls - S01E01 - Pilot.eng.sub")] [TestCase("2 Broke Girls - S01E01 - Pilot.English.sub")] [TestCase("2 Broke Girls - S01E01 - Pilot.english.sub")] + [TestCase("The Spanish Princess S02E02 Flodden 720p AMZN WEB-DL DDP5 1 H 264-NTb")] + [TestCase("The.Spanish.Princess.S02E02.1080p.WEB.H264-CAKES")] + [TestCase("The.Spanish.Princess.S02E06.Field.of.Cloth.of.Gold.1080p.AMZN.WEBRip.DDP5.1.x264-NTb")] public void should_parse_language_english(string postTitle) { var result = LanguageParser.ParseLanguage(postTitle); @@ -223,6 +226,8 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Russian.Puppets.S01E07.Cold.Action.HDTV.XviD-Droned")] [TestCase("Russian.Puppets.S01E07E08.Cold.Action.HDTV.XviD-Droned")] [TestCase("Russian.Puppets.S01.1080p.WEBRip.DDP5.1.x264-Drone")] + [TestCase("The.Spanish.Princess.S02E08.Peace.1080p.AMZN.WEBRip.DDP5.1.x264-NTb")] + [TestCase("The Spanish Princess S02E02 Flodden 720p AMZN WEB-DL DDP5 1 H 264-NTb")] public void should_not_parse_series_or_episode_title(string postTitle) { var result = Parser.Parser.ParseTitle(postTitle); diff --git a/src/NzbDrone.Core/Parser/LanguageParser.cs b/src/NzbDrone.Core/Parser/LanguageParser.cs index 0a39a80f2..676e7966b 100644 --- a/src/NzbDrone.Core/Parser/LanguageParser.cs +++ b/src/NzbDrone.Core/Parser/LanguageParser.cs @@ -14,7 +14,7 @@ namespace NzbDrone.Core.Parser private static readonly RegexReplace[] CleanSeriesTitleRegex = new[] { - new RegexReplace(@".*?\.(S\d{2}(?:E\d{2,4})*\..*)", "$1", RegexOptions.Compiled | RegexOptions.IgnoreCase) + new RegexReplace(@".*?[_. ](S\d{2}(?:E\d{2,4})*[_. ].*)", "$1", RegexOptions.Compiled | RegexOptions.IgnoreCase) }; private static readonly Regex LanguageRegex = new Regex(@"(?:\W|_)(?\b(?:ita|italian)\b)|(?german\b|videomann)|(?flemish)|(?greek)|(?(?:\W|_)(?:FR)(?:\W|_))|(?\brus\b)|(?\b(?:HUNDUB|HUN)\b)|(?\bHebDub\b)|(?\[(?:CH[ST]|BIG5|GB)\]|简|繁|字幕)",