1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-27 22:57:09 -04:00

Include available version in update health check

(cherry picked from commit 15e3c3efb18242caf28b9bfc77a72a78296018bf)

Closes #10227
This commit is contained in:
Bogdan
2024-07-28 00:48:39 +03:00
parent 5cac5b6068
commit 2575e3647f
18 changed files with 30 additions and 19 deletions
@@ -86,9 +86,20 @@ 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("UpdateAvailable"), "#new-update-is-available");
var latestAvailable = _checkUpdateService.AvailableUpdate();
if (latestAvailable != null)
{
return new HealthCheck(GetType(),
HealthCheckResult.Warning,
_localizationService.GetLocalizedString("UpdateAvailableHealthCheckMessage", new Dictionary<string, object>
{
{ "version", $"v{latestAvailable.Version}" }
}),
"#new-update-is-available");
}
}
return new HealthCheck(GetType());