update sync menus

This commit is contained in:
Luke Pulverenti
2017-07-15 16:19:58 -04:00
parent a0e7cdd2dc
commit cdf573c921
8 changed files with 17 additions and 18 deletions

View File

@@ -71,8 +71,6 @@ namespace Emby.Server.Implementations.ScheduledTasks
// Create a progress object for the update check
var updateInfo = await _appHost.CheckForApplicationUpdate(cancellationToken, new SimpleProgress<double>()).ConfigureAwait(false);
progress.Report(10);
if (!updateInfo.IsUpdateAvailable)
{
Logger.Debug("No application update available.");
@@ -87,15 +85,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
{
Logger.Info("Update Revision {0} available. Updating...", updateInfo.AvailableVersion);
EventHandler<double> innerProgressHandler = (sender, e) => progress.Report(e * .9 + .1);
var innerProgress = new SimpleProgress<double>();
innerProgress.ProgressChanged += innerProgressHandler;
await _appHost.UpdateApplication(updateInfo.Package, cancellationToken, innerProgress).ConfigureAwait(false);
// Release the event handler
innerProgress.ProgressChanged -= innerProgressHandler;
await _appHost.UpdateApplication(updateInfo.Package, cancellationToken, progress).ConfigureAwait(false);
}
else
{