mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 13:57:14 -04:00
Set HasUpdateAvailable
This commit is contained in:
parent
82c4297347
commit
6e28c72288
@ -1307,7 +1307,7 @@ namespace MediaBrowser.Server.Startup.Common
|
|||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
/// <param name="progress">The progress.</param>
|
/// <param name="progress">The progress.</param>
|
||||||
/// <returns>Task{CheckForUpdateResult}.</returns>
|
/// <returns>Task{CheckForUpdateResult}.</returns>
|
||||||
public override Task<CheckForUpdateResult> CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress<double> progress)
|
public override async Task<CheckForUpdateResult> CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress<double> progress)
|
||||||
{
|
{
|
||||||
var cacheLength = TimeSpan.FromHours(12);
|
var cacheLength = TimeSpan.FromHours(12);
|
||||||
var updateLevel = ConfigurationManager.CommonConfiguration.SystemUpdateLevel;
|
var updateLevel = ConfigurationManager.CommonConfiguration.SystemUpdateLevel;
|
||||||
@ -1321,8 +1321,12 @@ namespace MediaBrowser.Server.Startup.Common
|
|||||||
cacheLength = TimeSpan.FromMinutes(5);
|
cacheLength = TimeSpan.FromMinutes(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new GithubUpdater(HttpClient, JsonSerializer, cacheLength).CheckForUpdateResult("MediaBrowser", "Emby", ApplicationVersion, updateLevel, _releaseAssetFilename,
|
var result = await new GithubUpdater(HttpClient, JsonSerializer, cacheLength).CheckForUpdateResult("MediaBrowser", "Emby", ApplicationVersion, updateLevel, _releaseAssetFilename,
|
||||||
"MBServer", "Mbserver.zip", cancellationToken);
|
"MBServer", "Mbserver.zip", cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
|
HasUpdateAvailable = result.IsUpdateAvailable;
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user