You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
828 B
25 lines
828 B
4 years ago
|
namespace NzbDrone.Core.Download
|
||
|
{
|
||
|
public interface IProvideImportItemService
|
||
|
{
|
||
|
DownloadClientItem ProvideImportItem(DownloadClientItem item, DownloadClientItem previousImportAttempt);
|
||
|
}
|
||
|
|
||
|
public class ProvideImportItemService : IProvideImportItemService
|
||
|
{
|
||
|
private readonly IProvideDownloadClient _downloadClientProvider;
|
||
|
|
||
|
public ProvideImportItemService(IProvideDownloadClient downloadClientProvider)
|
||
|
{
|
||
|
_downloadClientProvider = downloadClientProvider;
|
||
|
}
|
||
|
|
||
|
public DownloadClientItem ProvideImportItem(DownloadClientItem item, DownloadClientItem previousImportAttempt)
|
||
|
{
|
||
|
var client = _downloadClientProvider.Get(item.DownloadClientInfo.Id);
|
||
|
|
||
|
return client.GetImportItem(item, previousImportAttempt);
|
||
|
}
|
||
|
}
|
||
|
}
|