mirror of
https://github.com/Radarr/Radarr.git
synced 2026-03-05 13:21:25 -05:00
New: Prioritize Exact Exception Release Group Matches over non-Exact Exception Groups
This commit is contained in:
@@ -49,13 +49,6 @@ public static class ReleaseGroupParser
|
|||||||
|
|
||||||
title = CleanReleaseGroupRegex.Replace(title);
|
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);
|
var exceptionExactMatch = ExceptionReleaseGroupRegexExact.Matches(title);
|
||||||
|
|
||||||
if (exceptionExactMatch.Count != 0)
|
if (exceptionExactMatch.Count != 0)
|
||||||
@@ -63,6 +56,13 @@ public static class ReleaseGroupParser
|
|||||||
return exceptionExactMatch.OfType<Match>().Last().Groups["releasegroup"].Value;
|
return exceptionExactMatch.OfType<Match>().Last().Groups["releasegroup"].Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var exceptionReleaseGroupRegex = ExceptionReleaseGroupRegex.Matches(title);
|
||||||
|
|
||||||
|
if (exceptionReleaseGroupRegex.Count != 0)
|
||||||
|
{
|
||||||
|
return exceptionReleaseGroupRegex.OfType<Match>().Last().Groups["releasegroup"].Value;
|
||||||
|
}
|
||||||
|
|
||||||
var matches = ReleaseGroupRegex.Matches(title);
|
var matches = ReleaseGroupRegex.Matches(title);
|
||||||
|
|
||||||
if (matches.Count != 0)
|
if (matches.Count != 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user