diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-01-09 12:17:35 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-01-09 12:52:29 -0500 |
| commit | 6e11df7eac019723c44ad08e76bc68dc1bea9abe (patch) | |
| tree | 573fa4e20ac1b6750fc4f2177c80a6c83b75d6b2 | |
| parent | 36ca4310613eedf5d2fc5d5b58f480b9194d66de (diff) | |
Set HasUpdateAvailable
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/ApplicationHost.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs index 143a31624..1d12089f3 100644 --- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs +++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs @@ -1299,7 +1299,7 @@ namespace MediaBrowser.Server.Startup.Common /// <param name="cancellationToken">The cancellation token.</param> /// <param name="progress">The progress.</param> /// <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 updateLevel = ConfigurationManager.CommonConfiguration.SystemUpdateLevel; @@ -1313,8 +1313,12 @@ namespace MediaBrowser.Server.Startup.Common cacheLength = TimeSpan.FromMinutes(5); } - return new GithubUpdater(HttpClient, JsonSerializer, cacheLength).CheckForUpdateResult("MediaBrowser", "Emby", ApplicationVersion, updateLevel, _releaseAssetFilename, - "MBServer", "Mbserver.zip", cancellationToken); + var result = await new GithubUpdater(HttpClient, JsonSerializer, cacheLength).CheckForUpdateResult("MediaBrowser", "Emby", ApplicationVersion, updateLevel, _releaseAssetFilename, + "MBServer", "Mbserver.zip", cancellationToken).ConfigureAwait(false); + + HasUpdateAvailable = result.IsUpdateAvailable; + + return result; } /// <summary> |
