Create constants for package names
This commit is contained in:
parent
72051998e7
commit
5d397aa363
|
@ -9,5 +9,7 @@ namespace MediaBrowser.Common.Constants
|
||||||
public static class Constants
|
public static class Constants
|
||||||
{
|
{
|
||||||
public const string MBAdminUrl = "http://www.mb3admin.com/admin/";
|
public const string MBAdminUrl = "http://www.mb3admin.com/admin/";
|
||||||
|
public const string MBServerPkgName = "MBServer";
|
||||||
|
public const string MBTheaterPkgName = "MBTheater";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using MediaBrowser.Api;
|
using MediaBrowser.Api;
|
||||||
|
using MediaBrowser.Common.Constants;
|
||||||
using MediaBrowser.Common.Implementations;
|
using MediaBrowser.Common.Implementations;
|
||||||
using MediaBrowser.Common.Implementations.HttpServer;
|
using MediaBrowser.Common.Implementations.HttpServer;
|
||||||
using MediaBrowser.Common.Implementations.Logging;
|
using MediaBrowser.Common.Implementations.Logging;
|
||||||
|
@ -180,7 +181,7 @@ namespace MediaBrowser.ServerApplication
|
||||||
{
|
{
|
||||||
var pkgManager = Resolve<IPackageManager>();
|
var pkgManager = Resolve<IPackageManager>();
|
||||||
var availablePackages = await pkgManager.GetAvailablePackages(Resolve<IHttpClient>(), Resolve<INetworkManager>(), Kernel.SecurityManager, Kernel.ResourcePools, Resolve<IJsonSerializer>(), CancellationToken.None).ConfigureAwait(false);
|
var availablePackages = await pkgManager.GetAvailablePackages(Resolve<IHttpClient>(), Resolve<INetworkManager>(), Kernel.SecurityManager, Kernel.ResourcePools, Resolve<IJsonSerializer>(), 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 } :
|
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 };
|
||||||
|
|
Loading…
Reference in New Issue
Block a user