Fixed: Removal of common suffixes such as [ettv] while parsing.

Fixes #874
This commit is contained in:
Taloth Saldono
2015-10-20 20:12:35 +02:00
parent e8d6d62fba
commit a06a3fa5d6
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -203,6 +203,9 @@ namespace NzbDrone.Core.Parser
private static readonly Regex CleanReleaseGroupRegex = new Regex(@"^(.*?[-._ ](S\d+E\d+)[-._ ])|-(RP|1|NZBGeek|sample)$",
RegexOptions.IgnoreCase | RegexOptions.Compiled);
private static readonly Regex CleanTorrentSuffixRegex = new Regex(@"\[(?:ettv|rartv|rarbg|cttv)\]$",
RegexOptions.IgnoreCase | RegexOptions.Compiled);
private static readonly Regex ReleaseGroupRegex = new Regex(@"-(?<releasegroup>[a-z0-9]+)\b(?<!WEB-DL|480p|720p|1080p)",
RegexOptions.IgnoreCase | RegexOptions.Compiled);
@@ -270,9 +273,13 @@ namespace NzbDrone.Core.Parser
var simpleTitle = SimpleTitleRegex.Replace(title, string.Empty);
simpleTitle = RemoveFileExtension(simpleTitle);
// TODO: Quick fix stripping [url] - prefixes.
simpleTitle = WebsitePrefixRegex.Replace(simpleTitle, string.Empty);
simpleTitle = CleanTorrentSuffixRegex.Replace(simpleTitle, string.Empty);
var airDateMatch = AirDateRegex.Match(simpleTitle);
if (airDateMatch.Success)
{