mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-03 01:01:34 +02:00
Age parsing added to the indexers.
This commit is contained in:
@@ -106,8 +106,13 @@ namespace NzbDrone.Core.Providers.Indexer
|
||||
if (currentResult != null)
|
||||
{
|
||||
var sizeString = Regex.Match(item.Summary.Text, @"<b>Size:</b> \d+\.\d{1,2} \w{2}<br />", RegexOptions.IgnoreCase).Value;
|
||||
|
||||
currentResult.Size = Parser.GetReportSize(sizeString);
|
||||
|
||||
var dateString = Regex.Match(item.Summary.Text,
|
||||
@"(?:\<b\>Added\:\<\/b\>)(?<date>.+?)(?:\<br\s\/\>)",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled).Groups["date"].Value;
|
||||
|
||||
currentResult.Age = DateTime.Today.Subtract(DateTime.Parse(dateString)).Days;
|
||||
}
|
||||
return currentResult;
|
||||
}
|
||||
|
Reference in New Issue
Block a user