have server ignore required server version on update check

This commit is contained in:
Luke Pulverenti 2013-09-28 14:08:08 -04:00
parent 1da4e55d51
commit 92c89d21e7

View File

@ -650,7 +650,16 @@ namespace MediaBrowser.ServerApplication
{ {
var availablePackages = await InstallationManager.GetAvailablePackagesWithoutRegistrationInfo(cancellationToken).ConfigureAwait(false); 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 } : return version != null ? new CheckForUpdateResult { AvailableVersion = version.version, IsUpdateAvailable = version.version > ApplicationVersion, Package = version } :
new CheckForUpdateResult { AvailableVersion = ApplicationVersion, IsUpdateAvailable = false }; new CheckForUpdateResult { AvailableVersion = ApplicationVersion, IsUpdateAvailable = false };