From 49eb3ab2cfa841f0636ba9989a89427c1fb0a240 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 8 Sep 2020 09:56:53 -0700 Subject: [PATCH] Don't parse subtitle language as language Fixed: Remove VOSTFR, NL-Subs and Nordic from language parsing (Use release profiles to reject these subtitles if you wish) Closes #280 Closes #3497 --- src/NzbDrone.Core/Parser/LanguageParser.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/NzbDrone.Core/Parser/LanguageParser.cs b/src/NzbDrone.Core/Parser/LanguageParser.cs index 4a768251a..0a39a80f2 100644 --- a/src/NzbDrone.Core/Parser/LanguageParser.cs +++ b/src/NzbDrone.Core/Parser/LanguageParser.cs @@ -17,7 +17,7 @@ namespace NzbDrone.Core.Parser 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)\]|简|繁|字幕)", + 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)\]|简|繁|字幕)", RegexOptions.IgnoreCase | RegexOptions.Compiled); private static readonly Regex CaseSensitiveLanguageRegex = new Regex(@"(?\bLT\b)|(?\bCZ\b)", @@ -78,9 +78,6 @@ namespace NzbDrone.Core.Parser if (lowerTitle.Contains("norwegian")) return Language.Norwegian; - if (lowerTitle.Contains("nordic")) - return Language.Norwegian; - if (lowerTitle.Contains("finnish")) return Language.Finnish;