diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-28 18:47:13 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-28 18:47:13 -0500 |
| commit | 6cb135f89c0a817ac7600e971d44a49de1d54283 (patch) | |
| tree | fab51763547895eaeeb8153f44132404e2bc0c59 /MediaBrowser.ServerApplication/ApplicationHost.cs | |
| parent | 2c2f832c1a06c891bff9a95705d5fa7574c6fc9a (diff) | |
| parent | 3657ef952d9de6cb57bb7d2283175a68e832397d (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.ServerApplication/ApplicationHost.cs')
| -rw-r--r-- | MediaBrowser.ServerApplication/ApplicationHost.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs index f350b2885..894f7cc75 100644 --- a/MediaBrowser.ServerApplication/ApplicationHost.cs +++ b/MediaBrowser.ServerApplication/ApplicationHost.cs @@ -149,7 +149,7 @@ namespace MediaBrowser.ServerApplication /// <value><c>true</c> if this instance can self update; otherwise, <c>false</c>.</value> public bool CanSelfUpdate { - get { return true; } + get { return Kernel.Configuration.EnableAutoUpdate; } } /// <summary> @@ -171,12 +171,14 @@ namespace MediaBrowser.ServerApplication /// <summary> /// Updates the application. /// </summary> + /// <param name="package">The package that contains the update</param> /// <param name="cancellationToken">The cancellation token.</param> /// <param name="progress">The progress.</param> /// <returns>Task.</returns> - public Task UpdateApplication(CancellationToken cancellationToken, IProgress<double> progress) + public Task UpdateApplication(PackageVersionInfo package, CancellationToken cancellationToken, IProgress<double> progress) { - return new ApplicationUpdater().UpdateApplication(cancellationToken, progress); + var pkgManager = Resolve<IPackageManager>(); + return pkgManager.InstallPackage(Resolve<IHttpClient>(), Resolve<ILogger>(), Kernel.ResourcePools, progress, Resolve<IZipClient>(), Kernel.ApplicationPaths, package, cancellationToken); } /// <summary> |
