From 3657ef952d9de6cb57bb7d2283175a68e832397d Mon Sep 17 00:00:00 2001 From: Eric Reed Date: Thu, 28 Feb 2013 16:03:59 -0500 Subject: First step of actual update We will now need a bootstrapper to complete the update on startup --- MediaBrowser.ServerApplication/ApplicationHost.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.ServerApplication') 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 /// true if this instance can self update; otherwise, false. public bool CanSelfUpdate { - get { return true; } + get { return Kernel.Configuration.EnableAutoUpdate; } } /// @@ -171,12 +171,14 @@ namespace MediaBrowser.ServerApplication /// /// Updates the application. /// + /// The package that contains the update /// The cancellation token. /// The progress. /// Task. - public Task UpdateApplication(CancellationToken cancellationToken, IProgress progress) + public Task UpdateApplication(PackageVersionInfo package, CancellationToken cancellationToken, IProgress progress) { - return new ApplicationUpdater().UpdateApplication(cancellationToken, progress); + var pkgManager = Resolve(); + return pkgManager.InstallPackage(Resolve(), Resolve(), Kernel.ResourcePools, progress, Resolve(), Kernel.ApplicationPaths, package, cancellationToken); } /// -- cgit v1.2.3