1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2025-01-04 22:41:49 +00:00

Fix download handling in AggregateIndexer

This commit is contained in:
chibidev 2017-08-12 11:12:02 +02:00
parent 9eade51d89
commit 3374c14311

View file

@ -27,9 +27,19 @@ namespace Jackett.Indexers.Meta
return Task.FromResult(IndexerConfigurationStatus.Completed); return Task.FromResult(IndexerConfigurationStatus.Completed);
} }
protected override IEnumerable<ReleaseInfo> FilterResults(TorznabQuery query, IEnumerable<ReleaseInfo> results) public override async Task<IEnumerable<ReleaseInfo>> ResultsForQuery(TorznabQuery query)
{ {
return results; if (!CanHandleQuery(query))
return new ReleaseInfo[0];
var results = await PerformQuery(query);
var correctedResults = results.Select(r =>
{
if (r.PublishDate > DateTime.Now)
r.PublishDate = DateTime.Now;
return r;
});
return correctedResults;
} }
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query) protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)