|
|
@ -159,6 +159,8 @@ namespace NzbDrone.Core.Parser
|
|
|
|
string.Empty,
|
|
|
|
string.Empty,
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static readonly Regex PercentRegex = new Regex(@"(?<=\b\d+)%", RegexOptions.Compiled);
|
|
|
|
|
|
|
|
|
|
|
|
private static readonly Regex FileExtensionRegex = new Regex(@"\.[a-z0-9]{2,4}$",
|
|
|
|
private static readonly Regex FileExtensionRegex = new Regex(@"\.[a-z0-9]{2,4}$",
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
|
|
|
|
|
|
|
|
|
|
@ -479,6 +481,8 @@ namespace NzbDrone.Core.Parser
|
|
|
|
if (long.TryParse(name, out number))
|
|
|
|
if (long.TryParse(name, out number))
|
|
|
|
return name;
|
|
|
|
return name;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
name = PercentRegex.Replace(name, "percent");
|
|
|
|
|
|
|
|
|
|
|
|
return NormalizeRegex.Replace(name).ToLower().RemoveAccent();
|
|
|
|
return NormalizeRegex.Replace(name).ToLower().RemoveAccent();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|