mirror of
https://github.com/Sonarr/Sonarr
synced 2025-03-11 14:47:44 +00:00
Include available version in update health check
This commit is contained in:
parent
f2f4a98eed
commit
15e3c3efb1
2 changed files with 13 additions and 3 deletions
|
@ -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());
|
return new HealthCheck(GetType());
|
||||||
|
|
|
@ -2037,7 +2037,7 @@
|
||||||
"UpcomingSeriesDescription": "Series has been announced but no exact air date yet",
|
"UpcomingSeriesDescription": "Series has been announced but no exact air date yet",
|
||||||
"UpdateAll": "Update All",
|
"UpdateAll": "Update All",
|
||||||
"UpdateAutomaticallyHelpText": "Automatically download and install updates. You will still be able to install from System: Updates",
|
"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",
|
"UpdateFiltered": "Update Filtered",
|
||||||
"UpdateMechanismHelpText": "Use {appName}'s built-in updater or a script",
|
"UpdateMechanismHelpText": "Use {appName}'s built-in updater or a script",
|
||||||
"UpdateMonitoring": "Update Monitoring",
|
"UpdateMonitoring": "Update Monitoring",
|
||||||
|
|
Loading…
Add table
Reference in a new issue