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.
37 lines
1.1 KiB
37 lines
1.1 KiB
using NzbDrone.Core.Configuration;
|
|
using NzbDrone.Core.Configuration.Events;
|
|
using NzbDrone.Core.Download;
|
|
using NzbDrone.Core.ThingiProvider.Events;
|
|
|
|
namespace NzbDrone.Core.HealthCheck.Checks
|
|
{
|
|
[CheckOn(typeof(ProviderUpdatedEvent<IDownloadClient>))]
|
|
[CheckOn(typeof(ProviderDeletedEvent<IDownloadClient>))]
|
|
[CheckOn(typeof(ConfigSavedEvent))]
|
|
public class ImportMechanismCheck : HealthCheckBase
|
|
{
|
|
private readonly IConfigService _configService;
|
|
|
|
public ImportMechanismCheck(IConfigService configService)
|
|
{
|
|
_configService = configService;
|
|
}
|
|
|
|
public override HealthCheck Check()
|
|
{
|
|
if (!_configService.EnableCompletedDownloadHandling)
|
|
{
|
|
return new HealthCheck(GetType(), HealthCheckResult.Warning, "Enable Completed Download Handling");
|
|
}
|
|
|
|
return new HealthCheck(GetType());
|
|
}
|
|
}
|
|
|
|
public class ImportMechanismCheckStatus
|
|
{
|
|
public IDownloadClient DownloadClient { get; set; }
|
|
public DownloadClientInfo Status { get; set; }
|
|
}
|
|
}
|