aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication/ApplicationHost.cs
diff options
context:
space:
mode:
authorEric Reed <ebr@mediabrowser3.com>2013-02-28 16:03:59 -0500
committerEric Reed <ebr@mediabrowser3.com>2013-02-28 16:04:11 -0500
commit3657ef952d9de6cb57bb7d2283175a68e832397d (patch)
tree7a467ecb679549d40a2b181e5292f8edad35ae68 /MediaBrowser.ServerApplication/ApplicationHost.cs
parent4947db0e2a8892fb723012e5403be3142dc88f0f (diff)
First step of actual update
We will now need a bootstrapper to complete the update on startup
Diffstat (limited to 'MediaBrowser.ServerApplication/ApplicationHost.cs')
-rw-r--r--MediaBrowser.ServerApplication/ApplicationHost.cs8
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>