From 92c89d21e7722404c231d66a04d817f8b877f076 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 28 Sep 2013 14:08:08 -0400 Subject: [PATCH] have server ignore required server version on update check --- MediaBrowser.ServerApplication/ApplicationHost.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs index 4327f4149..0128e6f8b 100644 --- a/MediaBrowser.ServerApplication/ApplicationHost.cs +++ b/MediaBrowser.ServerApplication/ApplicationHost.cs @@ -650,7 +650,16 @@ namespace MediaBrowser.ServerApplication { var availablePackages = await InstallationManager.GetAvailablePackagesWithoutRegistrationInfo(cancellationToken).ConfigureAwait(false); - var version = InstallationManager.GetLatestCompatibleVersion(availablePackages, Constants.MbServerPkgName, ApplicationVersion, ConfigurationManager.CommonConfiguration.SystemUpdateLevel); + var package = availablePackages.FirstOrDefault(p => p.name.Equals(Constants.MbServerPkgName, StringComparison.OrdinalIgnoreCase)); + + if (package == null) + { + return null; + } + + var version = package.versions + .OrderByDescending(v => v.version) + .FirstOrDefault(v => v.classification <= ConfigurationManager.CommonConfiguration.SystemUpdateLevel); return version != null ? new CheckForUpdateResult { AvailableVersion = version.version, IsUpdateAvailable = version.version > ApplicationVersion, Package = version } : new CheckForUpdateResult { AvailableVersion = ApplicationVersion, IsUpdateAvailable = false };