|
|
@ -517,7 +517,7 @@ namespace NzbDrone.Core.Parser
|
|
|
|
// Regex to detect whether the title was reversed.
|
|
|
|
// Regex to detect whether the title was reversed.
|
|
|
|
private static readonly Regex ReversedTitleRegex = new Regex(@"(?:^|[-._ ])(p027|p0801|\d{2,3}E\d{2}S)[-._ ]", RegexOptions.Compiled);
|
|
|
|
private static readonly Regex ReversedTitleRegex = new Regex(@"(?:^|[-._ ])(p027|p0801|\d{2,3}E\d{2}S)[-._ ]", RegexOptions.Compiled);
|
|
|
|
|
|
|
|
|
|
|
|
private static readonly RegexReplace NormalizeRegex = new RegexReplace(@"((?:\b|_)(?<!^)(a(?!$)|an|the|and|or|of)(?!$)(?:\b|_))|\W|_",
|
|
|
|
private static readonly RegexReplace NormalizeRegex = new RegexReplace(@"((?:\b|_)(?<!^)([aà](?!$)|an|the|and|or|of)(?!$)(?:\b|_))|\W|_",
|
|
|
|
string.Empty,
|
|
|
|
string.Empty,
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
|
|
|
|
|
|
|
|
|
|
@ -845,7 +845,7 @@ namespace NzbDrone.Core.Parser
|
|
|
|
// Replace `%` with `percent` to deal with the 3% case
|
|
|
|
// Replace `%` with `percent` to deal with the 3% case
|
|
|
|
title = PercentRegex.Replace(title, "percent");
|
|
|
|
title = PercentRegex.Replace(title, "percent");
|
|
|
|
|
|
|
|
|
|
|
|
return NormalizeRegex.Replace(title).ToLower().RemoveAccent();
|
|
|
|
return NormalizeRegex.Replace(title).ToLowerInvariant().RemoveAccent();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static string NormalizeEpisodeTitle(string title)
|
|
|
|
public static string NormalizeEpisodeTitle(string title)
|
|
|
|