mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 07:22:35 +01:00
Fixed failing tests.
This commit is contained in:
parent
080bf6787a
commit
bfe2976463
@ -21,7 +21,7 @@ namespace NzbDrone.Core.Configuration
|
|||||||
Version ReleaseVersion { get; }
|
Version ReleaseVersion { get; }
|
||||||
string ReleaseBranch { get; }
|
string ReleaseBranch { get; }
|
||||||
|
|
||||||
bool BuiltInUpdaterAllowed { get; }
|
bool IsExternalUpdateMechanism { get; }
|
||||||
UpdateMechanism DefaultUpdateMechanism { get; }
|
UpdateMechanism DefaultUpdateMechanism { get; }
|
||||||
string DefaultBranch { get; }
|
string DefaultBranch { get; }
|
||||||
}
|
}
|
||||||
@ -111,7 +111,7 @@ namespace NzbDrone.Core.Configuration
|
|||||||
public string ReleaseBranch { get; set; }
|
public string ReleaseBranch { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public bool BuiltInUpdaterAllowed => PackageUpdateMechanism == UpdateMechanism.BuiltIn;
|
public bool IsExternalUpdateMechanism => PackageUpdateMechanism >= UpdateMechanism.External;
|
||||||
public UpdateMechanism DefaultUpdateMechanism { get; private set; }
|
public UpdateMechanism DefaultUpdateMechanism { get; private set; }
|
||||||
public string DefaultBranch { get; private set; }
|
public string DefaultBranch { get; private set; }
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ namespace NzbDrone.Core.Update
|
|||||||
|
|
||||||
var externalMechanisms = Enum.GetValues(typeof(UpdateMechanism))
|
var externalMechanisms = Enum.GetValues(typeof(UpdateMechanism))
|
||||||
.Cast<UpdateMechanism>()
|
.Cast<UpdateMechanism>()
|
||||||
.Where(v => (int)v >= (int)UpdateMechanism.External)
|
.Where(v => v >= UpdateMechanism.External)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
|
|
||||||
foreach (var externalMechanism in externalMechanisms)
|
foreach (var externalMechanism in externalMechanisms)
|
||||||
|
@ -220,12 +220,12 @@ namespace NzbDrone.Core.Update
|
|||||||
|
|
||||||
|
|
||||||
// Safety net, ConfigureUpdateMechanism should take care of invalid settings
|
// 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);
|
_logger.ProgressDebug("Built-In updater disabled, please use {0} to install", _deploymentInfoProvider.PackageUpdateMechanism);
|
||||||
return;
|
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);
|
_logger.ProgressDebug("Update available, please use {0} to install", _deploymentInfoProvider.PackageUpdateMechanism);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user