|
|
|
@ -452,6 +452,13 @@ namespace NzbDrone.Core.Parser
|
|
|
|
|
private static readonly Regex AnimeReleaseGroupRegex = new Regex(@"^(?:\[(?<subgroup>(?!\s).+?(?<!\s))\](?:_|-|\s|\.)?)",
|
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
|
|
|
|
|
|
|
|
|
//Handle Exception Release Groups that don't follow -RlsGrp; Manual List
|
|
|
|
|
// name only...be very careful with this last; high chance of false positives
|
|
|
|
|
private static readonly Regex ExceptionReleaseGroupRegexExact = new Regex(@"(?<releasegroup>(?:D\-Z0N3|Fight-BB)\b)", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
|
|
|
|
|
|
|
|
|
//groups whose releases end with RlsGroup) or RlsGroup]
|
|
|
|
|
private static readonly Regex ExceptionReleaseGroupRegex = new Regex(@"(?<releasegroup>(Tigole|Joy|ImE|UTR|t3nzin)(?=\]|\)))", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
|
|
|
|
|
|
|
|
|
private static readonly Regex LanguageRegex = new Regex(@"(?:\W|_)(?<italian>\b(?:ita|italian)\b)|(?<german>german\b|videomann)|(?<flemish>flemish)|(?<greek>greek)|(?<french>(?:\W|_)(?:FR|VOSTFR)(?:\W|_))|(?<russian>\brus\b)|(?<dutch>nl\W?subs?)|(?<hungarian>\b(?:HUNDUB|HUN)\b)|(?<spanish>\b(?:español|castellano)\b)",
|
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
|
|
|
|
|
|
|
|
@ -723,6 +730,20 @@ namespace NzbDrone.Core.Parser
|
|
|
|
|
|
|
|
|
|
title = CleanReleaseGroupRegex.Replace(title);
|
|
|
|
|
|
|
|
|
|
var exceptionReleaseGroupRegex = ExceptionReleaseGroupRegex.Matches(title);
|
|
|
|
|
|
|
|
|
|
if (exceptionReleaseGroupRegex.Count != 0)
|
|
|
|
|
{
|
|
|
|
|
return exceptionReleaseGroupRegex.OfType<Match>().Last().Groups["releasegroup"].Value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var exceptionExactMatch = ExceptionReleaseGroupRegexExact.Matches(title);
|
|
|
|
|
|
|
|
|
|
if (exceptionExactMatch.Count != 0)
|
|
|
|
|
{
|
|
|
|
|
return exceptionExactMatch.OfType<Match>().Last().Groups["releasegroup"].Value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var matches = ReleaseGroupRegex.Matches(title);
|
|
|
|
|
|
|
|
|
|
if (matches.Count != 0)
|
|
|
|
|