mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Added SeasonSearchCommand
This commit is contained in:
parent
7ebcd2b75e
commit
8ee0789c62
6 changed files with 115 additions and 33 deletions
27
NzbDrone.Core/IndexerSearch/SeasonSearchService.cs
Normal file
27
NzbDrone.Core/IndexerSearch/SeasonSearchService.cs
Normal file
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using NzbDrone.Common.Messaging;
|
||||
using NzbDrone.Core.Download;
|
||||
|
||||
namespace NzbDrone.Core.IndexerSearch
|
||||
{
|
||||
public class SeasonSearchService : IExecute<SeasonSearchCommand>
|
||||
{
|
||||
private readonly ISearchForNzb _nzbSearchService;
|
||||
private readonly IDownloadApprovedReportsService _downloadApprovedReportsService;
|
||||
|
||||
public SeasonSearchService(ISearchForNzb nzbSearchService, IDownloadApprovedReportsService downloadApprovedReportsService)
|
||||
{
|
||||
_nzbSearchService = nzbSearchService;
|
||||
_downloadApprovedReportsService = downloadApprovedReportsService;
|
||||
}
|
||||
|
||||
public void Execute(SeasonSearchCommand message)
|
||||
{
|
||||
var decisions = _nzbSearchService.SeasonSearch(message.SeriesId, message.SeasonNumber);
|
||||
var qualified = _downloadApprovedReportsService.DownloadApproved(decisions);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue