Remove ApplicationVersion
This commit is contained in:
parent
469590c9c5
commit
8a5198e6a3
|
@ -429,14 +429,7 @@ namespace Emby.Server.Implementations
|
|||
_validAddressResults.Clear();
|
||||
}
|
||||
|
||||
private Version _applicationVersion;
|
||||
/// <summary>
|
||||
/// Gets the current application server version
|
||||
/// </summary>
|
||||
/// <value>The application server version.</value>
|
||||
public Version ApplicationVersion => _applicationVersion ?? (_applicationVersion = typeof(ApplicationHost).Assembly.GetName().Version);
|
||||
|
||||
public string ApplicationSemanticVersion => ApplicationVersion.ToString(3);
|
||||
public string ApplicationSemanticVersion => typeof(ApplicationHost).Assembly.GetName().Version.ToString(3);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current application server version
|
||||
|
|
|
@ -139,7 +139,7 @@ namespace MediaBrowser.Api
|
|||
/// <returns>System.Object.</returns>
|
||||
public object Get(GetPackage request)
|
||||
{
|
||||
var packages = _installationManager.GetAvailablePackages(CancellationToken.None, applicationVersion: _appHost.ApplicationVersion).Result;
|
||||
var packages = _installationManager.GetAvailablePackages(CancellationToken.None, applicationVersion: typeof(PackageService).Assembly.GetName().Version).Result;
|
||||
|
||||
var result = packages.FirstOrDefault(p => string.Equals(p.guid, request.AssemblyGuid ?? "none", StringComparison.OrdinalIgnoreCase))
|
||||
?? packages.FirstOrDefault(p => p.name.Equals(request.Name, StringComparison.OrdinalIgnoreCase));
|
||||
|
@ -154,7 +154,7 @@ namespace MediaBrowser.Api
|
|||
/// <returns>System.Object.</returns>
|
||||
public async Task<object> Get(GetPackages request)
|
||||
{
|
||||
IEnumerable<PackageInfo> packages = await _installationManager.GetAvailablePackages(CancellationToken.None, false, request.PackageType, _appHost.ApplicationVersion).ConfigureAwait(false);
|
||||
IEnumerable<PackageInfo> packages = await _installationManager.GetAvailablePackages(CancellationToken.None, false, request.PackageType, typeof(PackageService).Assembly.GetName().Version).ConfigureAwait(false);
|
||||
|
||||
if (!string.IsNullOrEmpty(request.TargetSystems))
|
||||
{
|
||||
|
@ -189,7 +189,7 @@ namespace MediaBrowser.Api
|
|||
public async Task Post(InstallPackage request)
|
||||
{
|
||||
var package = string.IsNullOrEmpty(request.Version) ?
|
||||
await _installationManager.GetLatestCompatibleVersion(request.Name, request.AssemblyGuid, _appHost.ApplicationVersion, request.UpdateClass).ConfigureAwait(false) :
|
||||
await _installationManager.GetLatestCompatibleVersion(request.Name, request.AssemblyGuid, typeof(PackageService).Assembly.GetName().Version, request.UpdateClass).ConfigureAwait(false) :
|
||||
await _installationManager.GetPackage(request.Name, request.AssemblyGuid, request.UpdateClass, Version.Parse(request.Version)).ConfigureAwait(false);
|
||||
|
||||
if (package == null)
|
||||
|
|
|
@ -65,12 +65,6 @@ namespace MediaBrowser.Common
|
|||
/// </summary>
|
||||
void Restart();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the application version.
|
||||
/// </summary>
|
||||
/// <value>The application version.</value>
|
||||
Version ApplicationVersion { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the application semantic version.
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue
Block a user