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.
Lidarr/src/NzbDrone.Core/Download/DownloadClientProvider.cs

29 lines
815 B

using System.Collections.Generic;
using System.Linq;
using NzbDrone.Core.Configuration;
12 years ago
using NzbDrone.Core.Download.Clients;
using NzbDrone.Core.Download.Clients.Nzbget;
using NzbDrone.Core.Download.Clients.Sabnzbd;
namespace NzbDrone.Core.Download
{
public interface IProvideDownloadClient
{
IDownloadClient GetDownloadClient();
}
public class DownloadClientProvider : IProvideDownloadClient
{
private readonly IDownloadClientFactory _downloadClientFactory;
12 years ago
public DownloadClientProvider(IDownloadClientFactory downloadClientFactory)
12 years ago
{
_downloadClientFactory = downloadClientFactory;
12 years ago
}
public IDownloadClient GetDownloadClient()
{
return _downloadClientFactory.Enabled().FirstOrDefault();
12 years ago
}
}
}