mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-21 22:25:03 -04:00
New: Drone now uses the Download Client API to determine if a download is ready for import. (User configuration is required to replace the drone factory with this feature)
This commit is contained in:
@@ -9,7 +9,7 @@ namespace NzbDrone.Core.Download
|
||||
{
|
||||
public interface IDownloadClientFactory : IProviderFactory<IDownloadClient, DownloadClientDefinition>
|
||||
{
|
||||
List<IDownloadClient> Enabled();
|
||||
|
||||
}
|
||||
|
||||
public class DownloadClientFactory : ProviderFactory<IDownloadClient, DownloadClientDefinition>, IDownloadClientFactory
|
||||
@@ -22,9 +22,18 @@ namespace NzbDrone.Core.Download
|
||||
_providerRepository = providerRepository;
|
||||
}
|
||||
|
||||
public List<IDownloadClient> Enabled()
|
||||
protected override List<DownloadClientDefinition> Active()
|
||||
{
|
||||
return GetAvailableProviders().Where(n => ((DownloadClientDefinition)n.Definition).Enable).ToList();
|
||||
return base.Active().Where(c => c.Enable).ToList();
|
||||
}
|
||||
|
||||
protected override DownloadClientDefinition GetTemplate(IDownloadClient provider)
|
||||
{
|
||||
var definition = base.GetTemplate(provider);
|
||||
|
||||
definition.Protocol = provider.Protocol;
|
||||
|
||||
return definition;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user