1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-23 22:25:14 -04:00

New: Parse ES as Spanish

This commit is contained in:
Bogdan
2024-10-12 19:15:21 +03:00
parent 4f47bb39ac
commit 0761e27cfa
3 changed files with 12 additions and 2 deletions
+8 -2
View File
@@ -39,8 +39,9 @@ namespace NzbDrone.Core.Parser
private static readonly Regex CaseSensitiveLanguageRegex = new Regex(@"(?:(?i)(?<!SUB[\W|_|^]))(?:(?<lithuanian>\bLT\b)|
(?<czech>\bCZ\b)|
(?<polish>\bPL\b)|
(?<bulgarian>\bBG\b))(?:(?i)(?![\W|_|^]SUB))|
(?<slovak>\bSK\b)",
(?<bulgarian>\bBG\b)|
(?<slovak>\bSK\b)|
(?<spanish>\b(?<!DTS[._ -])ES\b))(?:(?i)(?![\W|_|^]SUB))",
RegexOptions.Compiled | RegexOptions.IgnorePatternWhitespace);
private static readonly Regex GermanDualLanguageRegex = new (@"(?<!WEB[-_. ]?)\bDL\b", RegexOptions.Compiled | RegexOptions.IgnoreCase);
@@ -261,6 +262,11 @@ namespace NzbDrone.Core.Parser
{
languages.Add(Language.Slovak);
}
if (match.Groups["spanish"].Captures.Any())
{
languages.Add(Language.Spanish);
}
}
var matches = LanguageRegex.Matches(title);