|
|
|
@ -14,7 +14,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>\b(?:german|videomann|ger)\b)|(?<flemish>flemish)|(?<greek>greek)|(?<french>(?:\W|_)(?:FR|VO|VFF|VFQ|VFI|VF2|TRUEFRENCH)(?:\W|_))|(?<russian>\brus\b)|(?<english>\beng\b)|(?<hungarian>\b(?:HUNDUB|HUN)\b)|(?<hebrew>\bHebDub\b)|(?<chinese>\[(?:CH[ST]|BIG5|GB)\]|简|繁|字幕)",
|
|
|
|
|
private static readonly Regex LanguageRegex = new Regex(@"(?:\W|_|^)(?<italian>\b(?:ita|italian)\b)|(?<german>\b(?:german|videomann|ger)\b)|(?<flemish>flemish)|(?<bulgarian>bgaudio)|(?<greek>greek)|(?<french>(?:\W|_)(?:FR|VO|VFF|VFQ|VFI|VF2|TRUEFRENCH)(?:\W|_))|(?<russian>\brus\b)|(?<english>\beng\b)|(?<hungarian>\b(?:HUNDUB|HUN)\b)|(?<hebrew>\bHebDub\b)|(?<chinese>\[(?:CH[ST]|BIG5|GB)\]|简|繁|字幕)",
|
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
|
|
|
|
|
|
|
|
|
private static readonly Regex CaseSensitiveLanguageRegex = new Regex(@"(?<lithuanian>\bLT\b)|(?<czech>\bCZ\b)",
|
|
|
|
@ -92,6 +92,11 @@ namespace NzbDrone.Core.Parser
|
|
|
|
|
languages.Add(Language.Thai);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (lowerTitle.Contains("bulgarian"))
|
|
|
|
|
{
|
|
|
|
|
languages.Add(Language.Bulgarian);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (lowerTitle.Contains("polish"))
|
|
|
|
|
{
|
|
|
|
|
languages.Add(Language.Polish);
|
|
|
|
@ -189,6 +194,11 @@ namespace NzbDrone.Core.Parser
|
|
|
|
|
languages.Add(Language.English);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (match.Groups["bulgarian"].Success)
|
|
|
|
|
{
|
|
|
|
|
languages.Add(Language.Bulgarian);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (match.Groups["dutch"].Success)
|
|
|
|
|
{
|
|
|
|
|
languages.Add(Language.Dutch);
|
|
|
|
|