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

Fixed: Parse GER/DE releases as German language

Fix parsing for German language to correctly detect "GER" and "DE"
Update test for GER/DE language parsing.
This commit is contained in:
epmt7w3ugk
2025-01-07 14:47:13 +01:00
committed by Bogdan
parent 884abc0368
commit d375b5ffbe
3 changed files with 14 additions and 2 deletions
+7 -1
View File
@@ -16,7 +16,7 @@ namespace NzbDrone.Core.Parser
private static readonly Logger Logger = NzbDroneLogger.GetLogger(typeof(LanguageParser));
private static readonly Regex LanguageRegex = new Regex(@"(?:\W|_|^)(?<italian>\b(?:ita|italian)\b)|
(?<german>german\b|videomann|ger[. ]dub)|
(?<german>german\b|videomann|ger[. ]dub|\bger\b)|
(?<flemish>flemish)|
(?<bulgarian>bgaudio)|
(?<romanian>rodubbed)|
@@ -44,6 +44,7 @@ namespace NzbDrone.Core.Parser
(?<polish>\bPL\b)|
(?<bulgarian>\bBG\b)|
(?<slovak>\bSK\b)|
(?<german>\bDE\b)|
(?<spanish>\b(?<!DTS[._ -])ES\b))(?:(?i)(?![\W|_|^]SUB))",
RegexOptions.Compiled | RegexOptions.IgnorePatternWhitespace);
@@ -285,6 +286,11 @@ namespace NzbDrone.Core.Parser
{
languages.Add(Language.Spanish);
}
if (match.Groups["german"].Captures.Any())
{
languages.Add(Language.German);
}
}
var matches = LanguageRegex.Matches(title);