Fixed: Added permanent Health Check warning to ensure Drone Factory is no longer used.
This commit is contained in:
parent
ab49afe116
commit
ff6841e410
|
@ -0,0 +1,30 @@
|
|||
using NzbDrone.Common.Disk;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.Configuration.Events;
|
||||
|
||||
namespace NzbDrone.Core.HealthCheck.Checks
|
||||
{
|
||||
[CheckOn(typeof(ConfigSavedEvent))]
|
||||
public class DeprecatedDroneFactoryCheck : HealthCheckBase
|
||||
{
|
||||
private readonly IConfigService _configService;
|
||||
|
||||
public DeprecatedDroneFactoryCheck(IConfigService configService)
|
||||
{
|
||||
_configService = configService;
|
||||
}
|
||||
|
||||
public override HealthCheck Check()
|
||||
{
|
||||
var droneFactoryFolder = _configService.DownloadedEpisodesFolder;
|
||||
|
||||
if (droneFactoryFolder.IsNullOrWhiteSpace())
|
||||
{
|
||||
return new HealthCheck(GetType());
|
||||
}
|
||||
|
||||
return new HealthCheck(GetType(), HealthCheckResult.Warning, "Drone Factory is deprecated and should not be used", "#drone-factory-is-deprecated");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -566,6 +566,7 @@
|
|||
<Compile Include="HealthCheck\Checks\AppDataLocationCheck.cs" />
|
||||
<Compile Include="HealthCheck\Checks\DownloadClientCheck.cs" />
|
||||
<Compile Include="HealthCheck\Checks\DownloadClientStatusCheck.cs" />
|
||||
<Compile Include="HealthCheck\Checks\DeprecatedDroneFactoryCheck.cs" />
|
||||
<Compile Include="HealthCheck\Checks\MountCheck.cs" />
|
||||
<Compile Include="HealthCheck\Checks\DroneFactoryCheck.cs" />
|
||||
<Compile Include="HealthCheck\Checks\ImportMechanismCheck.cs" />
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<fieldset class="advanced-setting">
|
||||
<legend>Drone Factory Options</legend>
|
||||
<div class="alert alert-warning">
|
||||
Drone Factory is deprecated and should be disabled, use Wanted->Manual Import to manually import arbitrary directories. See <a href="https://github.com/Sonarr/Sonarr/wiki/Health-Checks#drone-factory-is-deprecated">Wiki</a>.
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">Drone Factory</label>
|
||||
|
||||
|
|
Loading…
Reference in New Issue