|
|
@ -172,6 +172,10 @@ namespace NzbDrone.Core.Parser
|
|
|
|
string.Empty,
|
|
|
|
string.Empty,
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static readonly RegexReplace WebsitePostfixRegex = new RegexReplace(@"\[\s*[-a-z]+(\.[a-z0-9]+)+\s*\]$",
|
|
|
|
|
|
|
|
string.Empty,
|
|
|
|
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
|
|
|
|
|
|
|
|
|
|
|
private static readonly Regex AirDateRegex = new Regex(@"^(.*?)(?<!\d)((?<airyear>\d{4})[_.-](?<airmonth>[0-1][0-9])[_.-](?<airday>[0-3][0-9])|(?<airmonth>[0-1][0-9])[_.-](?<airday>[0-3][0-9])[_.-](?<airyear>\d{4}))(?!\d)",
|
|
|
|
private static readonly Regex AirDateRegex = new Regex(@"^(.*?)(?<!\d)((?<airyear>\d{4})[_.-](?<airmonth>[0-1][0-9])[_.-](?<airday>[0-3][0-9])|(?<airmonth>[0-1][0-9])[_.-](?<airday>[0-3][0-9])[_.-](?<airyear>\d{4}))(?!\d)",
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
|
|
|
|
|
|
|
|
|
|
@ -256,6 +260,7 @@ namespace NzbDrone.Core.Parser
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: Quick fix stripping [url] - prefixes.
|
|
|
|
// TODO: Quick fix stripping [url] - prefixes.
|
|
|
|
simpleTitle = WebsitePrefixRegex.Replace(simpleTitle);
|
|
|
|
simpleTitle = WebsitePrefixRegex.Replace(simpleTitle);
|
|
|
|
|
|
|
|
simpleTitle = WebsitePostfixRegex.Replace(simpleTitle);
|
|
|
|
|
|
|
|
|
|
|
|
simpleTitle = CleanTorrentSuffixRegex.Replace(simpleTitle);
|
|
|
|
simpleTitle = CleanTorrentSuffixRegex.Replace(simpleTitle);
|
|
|
|
|
|
|
|
|
|
|
@ -340,6 +345,7 @@ namespace NzbDrone.Core.Parser
|
|
|
|
var simpleTitle = SimpleTitleRegex.Replace(releaseTitle);
|
|
|
|
var simpleTitle = SimpleTitleRegex.Replace(releaseTitle);
|
|
|
|
|
|
|
|
|
|
|
|
simpleTitle = WebsitePrefixRegex.Replace(simpleTitle);
|
|
|
|
simpleTitle = WebsitePrefixRegex.Replace(simpleTitle);
|
|
|
|
|
|
|
|
simpleTitle = WebsitePostfixRegex.Replace(simpleTitle);
|
|
|
|
|
|
|
|
|
|
|
|
simpleTitle = CleanTorrentSuffixRegex.Replace(simpleTitle);
|
|
|
|
simpleTitle = CleanTorrentSuffixRegex.Replace(simpleTitle);
|
|
|
|
|
|
|
|
|
|
|
@ -487,6 +493,7 @@ namespace NzbDrone.Core.Parser
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: Quick fix stripping [url] - prefixes.
|
|
|
|
// TODO: Quick fix stripping [url] - prefixes.
|
|
|
|
simpleTitle = WebsitePrefixRegex.Replace(simpleTitle);
|
|
|
|
simpleTitle = WebsitePrefixRegex.Replace(simpleTitle);
|
|
|
|
|
|
|
|
simpleTitle = WebsitePostfixRegex.Replace(simpleTitle);
|
|
|
|
|
|
|
|
|
|
|
|
simpleTitle = CleanTorrentSuffixRegex.Replace(simpleTitle);
|
|
|
|
simpleTitle = CleanTorrentSuffixRegex.Replace(simpleTitle);
|
|
|
|
|
|
|
|
|
|
|
|