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.
39 lines
1.3 KiB
39 lines
1.3 KiB
using NzbDrone.Core.Configuration;
|
|
using NzbDrone.Core.Configuration.Events;
|
|
using NzbDrone.Core.Download;
|
|
using NzbDrone.Core.Localization;
|
|
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, ILocalizationService localizationService)
|
|
: base(localizationService)
|
|
{
|
|
_configService = configService;
|
|
}
|
|
|
|
public override HealthCheck Check()
|
|
{
|
|
if (!_configService.EnableCompletedDownloadHandling)
|
|
{
|
|
return new HealthCheck(GetType(), HealthCheckResult.Warning, _localizationService.GetLocalizedString("ImportMechanismHealthCheckMessage"), "#completed-download-handling-is-disabled");
|
|
}
|
|
|
|
return new HealthCheck(GetType());
|
|
}
|
|
}
|
|
|
|
public class ImportMechanismCheckStatus
|
|
{
|
|
public IDownloadClient DownloadClient { get; set; }
|
|
public DownloadClientInfo Status { get; set; }
|
|
}
|
|
}
|