New: Added support for limited retention. Reports older than the configured retention are skipped.

This commit is contained in:
kay.one
2012-02-18 13:18:00 -08:00
parent 0dcbe11a41
commit 9d126e54c9
7 changed files with 7 additions and 30 deletions

View File

@@ -104,13 +104,8 @@ namespace NzbDrone.Core.Providers.Indexer
{
var sizeString = Regex.Match(item.Summary.Text, @">\d+\.\d{1,2} \w{2}</a>", RegexOptions.IgnoreCase).Value;
currentResult.Size = Parser.GetReportSize(sizeString);
var dateString = Regex.Match(item.Summary.Text,
@"(?:\<b\>Posted\:\<\/b\>\s)(?<date>.+?)(?:\s[a-zA-Z]+)(?:\<br\s\/\>)",
RegexOptions.IgnoreCase | RegexOptions.Compiled).Groups["date"].Value;
currentResult.Age = DateTime.Today.Subtract(DateTime.Parse(dateString)).Days;
}
return currentResult;
}
}