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:
Taloth Saldono
2014-04-19 17:09:22 +02:00
parent dcb586b937
commit 2035fe8578
196 changed files with 3961 additions and 2223 deletions
@@ -1,4 +1,5 @@
using System;
using System.Linq;
using NzbDrone.Core.Download;
namespace NzbDrone.Core.HealthCheck.Checks
@@ -14,16 +15,19 @@ namespace NzbDrone.Core.HealthCheck.Checks
public override HealthCheck Check()
{
var downloadClient = _downloadClientProvider.GetDownloadClient();
var downloadClients = _downloadClientProvider.GetDownloadClients();
if (downloadClient == null)
if (downloadClients.Count() == 0)
{
return new HealthCheck(GetType(), HealthCheckResult.Warning, "No download client is available");
}
try
{
downloadClient.GetQueue();
foreach (var downloadClient in downloadClients)
{
downloadClient.GetItems();
}
}
catch (Exception)
{