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

24 lines
617 B

using System.Linq;
namespace NzbDrone.Core.Download
{
public interface IProvideDownloadClient
{
IDownloadClient GetDownloadClient();
}
public class DownloadClientProvider : IProvideDownloadClient
{
private readonly IDownloadClientFactory _downloadClientFactory;
public DownloadClientProvider(IDownloadClientFactory downloadClientFactory)
{
_downloadClientFactory = downloadClientFactory;
}
public IDownloadClient GetDownloadClient()
{
return _downloadClientFactory.Enabled().FirstOrDefault();
}
}
}