mirror of
https://github.com/Jackett/Jackett
synced 2025-01-02 13:16:16 +00:00
Fix download handling in AggregateIndexer
This commit is contained in:
parent
9eade51d89
commit
3374c14311
1 changed files with 12 additions and 2 deletions
|
@ -27,9 +27,19 @@ namespace Jackett.Indexers.Meta
|
|||
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)
|
||||
|
|
Loading…
Reference in a new issue