Include available version in update health check
This commit is contained in:
parent
f2f4a98eed
commit
15e3c3efb1
|
@ -86,9 +86,19 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
|||
}
|
||||
}
|
||||
|
||||
if (BuildInfo.BuildDateTime < DateTime.UtcNow.AddDays(-14) && _checkUpdateService.AvailableUpdate() != null)
|
||||
if (BuildInfo.BuildDateTime < DateTime.UtcNow.AddDays(-14))
|
||||
{
|
||||
return new HealthCheck(GetType(), HealthCheckResult.Warning, _localizationService.GetLocalizedString("UpdateAvailableHealthCheckMessage"));
|
||||
var latestAvailable = _checkUpdateService.AvailableUpdate();
|
||||
|
||||
if (latestAvailable != null)
|
||||
{
|
||||
return new HealthCheck(GetType(),
|
||||
HealthCheckResult.Warning,
|
||||
_localizationService.GetLocalizedString("UpdateAvailableHealthCheckMessage", new Dictionary<string, object>
|
||||
{
|
||||
{ "version", $"v{latestAvailable.Version}" }
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
return new HealthCheck(GetType());
|
||||
|
|
|
@ -2037,7 +2037,7 @@
|
|||
"UpcomingSeriesDescription": "Series has been announced but no exact air date yet",
|
||||
"UpdateAll": "Update All",
|
||||
"UpdateAutomaticallyHelpText": "Automatically download and install updates. You will still be able to install from System: Updates",
|
||||
"UpdateAvailableHealthCheckMessage": "New update is available",
|
||||
"UpdateAvailableHealthCheckMessage": "New update is available: {version}",
|
||||
"UpdateFiltered": "Update Filtered",
|
||||
"UpdateMechanismHelpText": "Use {appName}'s built-in updater or a script",
|
||||
"UpdateMonitoring": "Update Monitoring",
|
||||
|
|
Loading…
Reference in New Issue