From fcdd0f21c7a06de2f144c649fceea5401e941c9a Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Fri, 13 Mar 2020 20:18:37 +0100 Subject: [PATCH] Fixed: Wrongly parsing language in series title for season packs (episodes were already handled) --- src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs | 2 ++ src/NzbDrone.Core/Parser/LanguageParser.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs index 0298e3eff..471e80cf2 100644 --- a/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs @@ -228,6 +228,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")] 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 b2c5cdc8c..d3b535a66 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|VOSTFR)(?:\W|_))|(?\brus\b)|(?nl\W?subs?)|(?\b(?:HUNDUB|HUN)\b)|(?\bHebDub\b)|(?\[(?:CH[ST]|BIG5|GB)\]|简|繁|字幕)",