Fixed: Detection of russian releases using 'rus' in the title

This commit is contained in:
Mark McDowall
2014-02-11 19:18:17 -08:00
parent a6c653651f
commit 54f01ce41d
2 changed files with 5 additions and 2 deletions
+4 -2
View File
@@ -108,7 +108,7 @@ namespace NzbDrone.Core.Parser
private static readonly Regex MultiPartCleanupRegex = new Regex(@"\(\d+\)$", RegexOptions.Compiled);
private static readonly Regex LanguageRegex = new Regex(@"(?:\W|_)(?<italian>ita|italian)|(?<german>german\b)|(?<flemish>flemish)|(?<greek>greek)|(?<french>(?:\W|_)FR)(?:\W|_)",
private static readonly Regex LanguageRegex = new Regex(@"(?:\W|_)(?<italian>ita|italian)|(?<german>german\b)|(?<flemish>flemish)|(?<greek>greek)|(?<french>(?:\W|_)FR)(?:\W|_)|(?<russian>\brus\b)",
RegexOptions.IgnoreCase | RegexOptions.Compiled);
private static readonly Regex YearInTitleRegex = new Regex(@"^(?<title>.+?)(?:\W|_)?(?<year>\d{4})",
@@ -148,7 +148,6 @@ namespace NzbDrone.Core.Parser
foreach (var regex in ReportTitleRegex)
{
var regexString = regex.ToString();
var match = regex.Matches(simpleTitle);
if (match.Count != 0)
@@ -467,6 +466,9 @@ namespace NzbDrone.Core.Parser
if (match.Groups["french"].Success)
return Language.French;
if (match.Groups["russian"].Success)
return Language.Russian;
return Language.English;
}