diff --git a/src/NzbDrone.Core/Configuration/DeploymentInfoProvider.cs b/src/NzbDrone.Core/Configuration/DeploymentInfoProvider.cs index f2609ab66..964f3873b 100644 --- a/src/NzbDrone.Core/Configuration/DeploymentInfoProvider.cs +++ b/src/NzbDrone.Core/Configuration/DeploymentInfoProvider.cs @@ -21,7 +21,7 @@ namespace NzbDrone.Core.Configuration Version ReleaseVersion { get; } string ReleaseBranch { get; } - bool BuiltInUpdaterAllowed { get; } + bool IsExternalUpdateMechanism { get; } UpdateMechanism DefaultUpdateMechanism { get; } string DefaultBranch { get; } } @@ -111,7 +111,7 @@ namespace NzbDrone.Core.Configuration public string ReleaseBranch { get; set; } - public bool BuiltInUpdaterAllowed => PackageUpdateMechanism == UpdateMechanism.BuiltIn; + public bool IsExternalUpdateMechanism => PackageUpdateMechanism >= UpdateMechanism.External; public UpdateMechanism DefaultUpdateMechanism { get; private set; } public string DefaultBranch { get; private set; } } diff --git a/src/NzbDrone.Core/Update/ConfigureUpdateMechanism.cs b/src/NzbDrone.Core/Update/ConfigureUpdateMechanism.cs index eb4f4998b..c8592166d 100644 --- a/src/NzbDrone.Core/Update/ConfigureUpdateMechanism.cs +++ b/src/NzbDrone.Core/Update/ConfigureUpdateMechanism.cs @@ -35,7 +35,7 @@ namespace NzbDrone.Core.Update var externalMechanisms = Enum.GetValues(typeof(UpdateMechanism)) .Cast() - .Where(v => (int)v >= (int)UpdateMechanism.External) + .Where(v => v >= UpdateMechanism.External) .ToArray(); foreach (var externalMechanism in externalMechanisms) diff --git a/src/NzbDrone.Core/Update/InstallUpdateService.cs b/src/NzbDrone.Core/Update/InstallUpdateService.cs index c38cfc453..a57a7eb8a 100644 --- a/src/NzbDrone.Core/Update/InstallUpdateService.cs +++ b/src/NzbDrone.Core/Update/InstallUpdateService.cs @@ -220,12 +220,12 @@ namespace NzbDrone.Core.Update // Safety net, ConfigureUpdateMechanism should take care of invalid settings - if (_configFileProvider.UpdateMechanism == UpdateMechanism.BuiltIn && !_deploymentInfoProvider.BuiltInUpdaterAllowed) + if (_configFileProvider.UpdateMechanism == UpdateMechanism.BuiltIn && _deploymentInfoProvider.IsExternalUpdateMechanism) { _logger.ProgressDebug("Built-In updater disabled, please use {0} to install", _deploymentInfoProvider.PackageUpdateMechanism); return; } - else if (_configFileProvider.UpdateMechanism != UpdateMechanism.Script && !_deploymentInfoProvider.BuiltInUpdaterAllowed) + else if (_configFileProvider.UpdateMechanism != UpdateMechanism.Script && _deploymentInfoProvider.IsExternalUpdateMechanism) { _logger.ProgressDebug("Update available, please use {0} to install", _deploymentInfoProvider.PackageUpdateMechanism); return;