aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Rabert <ar@nullsum.net>2019-01-19 21:34:47 -0500
committerAndrew Rabert <ar@nullsum.net>2019-01-19 21:34:47 -0500
commit8a5198e6a395ed03fb471e62687fceecdf947abf (patch)
tree7b704bec6d8aba6f690cdad539dff2fdf2717668
parent469590c9c51f028da454e7e31bea0e37b8f91f15 (diff)
Remove ApplicationVersion
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs9
-rw-r--r--MediaBrowser.Api/PackageService.cs6
-rw-r--r--MediaBrowser.Common/IApplicationHost.cs6
3 files changed, 4 insertions, 17 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index f0e2eec20..4da50d707 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -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
diff --git a/MediaBrowser.Api/PackageService.cs b/MediaBrowser.Api/PackageService.cs
index c202f0f6b..16819ee37 100644
--- a/MediaBrowser.Api/PackageService.cs
+++ b/MediaBrowser.Api/PackageService.cs
@@ -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)
diff --git a/MediaBrowser.Common/IApplicationHost.cs b/MediaBrowser.Common/IApplicationHost.cs
index 94dd251cf..06437c6a9 100644
--- a/MediaBrowser.Common/IApplicationHost.cs
+++ b/MediaBrowser.Common/IApplicationHost.cs
@@ -66,12 +66,6 @@ namespace MediaBrowser.Common
void Restart();
/// <summary>
- /// Gets the application version.
- /// </summary>
- /// <value>The application version.</value>
- Version ApplicationVersion { get; }
-
- /// <summary>
/// Gets the application semantic version.
/// </summary>
/// <value>The application semantic version.</value>