From 5d397aa3635127eb4927729dcf7795a8176ceab5 Mon Sep 17 00:00:00 2001 From: Eric Reed Date: Sat, 2 Mar 2013 13:54:31 -0500 Subject: [PATCH] Create constants for package names --- MediaBrowser.Common/Constants/Constants.cs | 2 ++ MediaBrowser.ServerApplication/ApplicationHost.cs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Common/Constants/Constants.cs b/MediaBrowser.Common/Constants/Constants.cs index 676518737d..c1c79d1996 100644 --- a/MediaBrowser.Common/Constants/Constants.cs +++ b/MediaBrowser.Common/Constants/Constants.cs @@ -9,5 +9,7 @@ namespace MediaBrowser.Common.Constants public static class Constants { public const string MBAdminUrl = "http://www.mb3admin.com/admin/"; + public const string MBServerPkgName = "MBServer"; + public const string MBTheaterPkgName = "MBTheater"; } } diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs index ce4aa5ebd5..6c39d0b6b2 100644 --- a/MediaBrowser.ServerApplication/ApplicationHost.cs +++ b/MediaBrowser.ServerApplication/ApplicationHost.cs @@ -1,4 +1,5 @@ using MediaBrowser.Api; +using MediaBrowser.Common.Constants; using MediaBrowser.Common.Implementations; using MediaBrowser.Common.Implementations.HttpServer; using MediaBrowser.Common.Implementations.Logging; @@ -180,7 +181,7 @@ namespace MediaBrowser.ServerApplication { var pkgManager = Resolve(); var availablePackages = await pkgManager.GetAvailablePackages(Resolve(), Resolve(), Kernel.SecurityManager, Kernel.ResourcePools, Resolve(), CancellationToken.None).ConfigureAwait(false); - var version = Kernel.InstallationManager.GetLatestCompatibleVersion(availablePackages, "MBServer", Kernel.Configuration.SystemUpdateLevel); + var version = Kernel.InstallationManager.GetLatestCompatibleVersion(availablePackages, Constants.MBServerPkgName, Kernel.Configuration.SystemUpdateLevel); return version != null ? new CheckForUpdateResult { AvailableVersion = version.version, IsUpdateAvailable = version.version > ApplicationVersion, Package = version } : new CheckForUpdateResult { AvailableVersion = ApplicationVersion, IsUpdateAvailable = false };