mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
added some custom cells for resources.
This commit is contained in:
parent
c93548c9f6
commit
bf499ed98a
5 changed files with 76 additions and 17 deletions
|
@ -13,6 +13,7 @@ namespace NzbDrone.Api.Indexers
|
|||
private readonly IFetchAndParseRss _rssFetcherAndParser;
|
||||
private readonly ISearchForNzb _nzbSearchService;
|
||||
private readonly IMakeDownloadDecision _downloadDecisionMaker;
|
||||
private static List<DownloadDecision> results;
|
||||
|
||||
public ReleaseModule(IFetchAndParseRss rssFetcherAndParser, ISearchForNzb nzbSearchService, IMakeDownloadDecision downloadDecisionMaker)
|
||||
{
|
||||
|
@ -41,10 +42,14 @@ namespace NzbDrone.Api.Indexers
|
|||
|
||||
private List<ReleaseResource> GetRss()
|
||||
{
|
||||
var reports = _rssFetcherAndParser.Fetch();
|
||||
var decisions = _downloadDecisionMaker.GetRssDecision(reports);
|
||||
if (results == null)
|
||||
{
|
||||
var reports = _rssFetcherAndParser.Fetch();
|
||||
var decisions = _downloadDecisionMaker.GetRssDecision(reports);
|
||||
results = decisions;
|
||||
}
|
||||
|
||||
return MapDecisions(decisions);
|
||||
return MapDecisions(results);
|
||||
}
|
||||
|
||||
private static List<ReleaseResource> MapDecisions(IEnumerable<DownloadDecision> decisions)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue