aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs31
-rw-r--r--Emby.Server.Implementations/Emby.Server.Implementations.csproj3
2 files changed, 32 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 91eaf9bbf..f186ccdaa 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -47,6 +47,7 @@ using Emby.Server.Implementations.Threading;
using Emby.Server.Implementations.TV;
using Emby.Server.Implementations.Updates;
using Emby.Server.Implementations.Xml;
+using Jellyfin.Versioning;
using MediaBrowser.Api;
using MediaBrowser.Common;
using MediaBrowser.Common.Configuration;
@@ -434,7 +435,30 @@ namespace Emby.Server.Implementations
/// Gets the current application version
/// </summary>
/// <value>The application version.</value>
- public Version ApplicationVersion => _version ?? (_version = typeof(ApplicationHost).Assembly.GetName().Version);
+ public Version ApplicationVersion => _version ?? (_version = ApplicationExtendedVersion.ApiVersion);
+
+ private Version _serverVersion;
+ /// <summary>
+ /// Gets the current application server version
+ /// </summary>
+ /// <value>The application server version.</value>
+ public Version ApplicationServerVersion => _serverVersion ?? (_serverVersion = typeof(ApplicationHost).Assembly.GetName().Version);
+
+ private ExtendedVersion _extendedVersion;
+ /// <summary>
+ /// Gets the current application server version
+ /// </summary>
+ /// <value>The application server version.</value>
+ public ExtendedVersion ApplicationExtendedVersion => _extendedVersion ??
+ (_extendedVersion = typeof(ApplicationHost).Assembly.GetCustomAttributes(typeof(AssemblyExtendedVersion), false)
+ .Cast<AssemblyExtendedVersion>().FirstOrDefault().ExtendedVersion);
+
+ private string _productName;
+ /// <summary>
+ /// Gets the current application name
+ /// </summary>
+ /// <value>The application name.</value>
+ public string ApplicationProductName => _productName ?? (_productName = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location).ProductName);
private DeviceId _deviceId;
public string SystemId
@@ -1826,6 +1850,9 @@ namespace Emby.Server.Implementations
HasPendingRestart = HasPendingRestart,
IsShuttingDown = IsShuttingDown,
Version = ApplicationVersion.ToString(),
+ ServerVersion = ApplicationServerVersion.ToString(),
+ ExtendedVersion = ApplicationExtendedVersion,
+ ProductName = ApplicationProductName,
WebSocketPortNumber = HttpPort,
CompletedInstallations = InstallationManager.CompletedInstallations.ToArray(),
Id = SystemId,
@@ -1872,6 +1899,8 @@ namespace Emby.Server.Implementations
return new PublicSystemInfo
{
Version = ApplicationVersion.ToString(),
+ ServerVersion = ApplicationServerVersion.ToString(),
+ ExtendedVersion = ApplicationExtendedVersion,
Id = SystemId,
OperatingSystem = EnvironmentInfo.OperatingSystem.ToString(),
WanAddress = wanAddress,
diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj
index 5a0e1da4d..843718756 100644
--- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj
+++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj
@@ -3,6 +3,7 @@
<ItemGroup>
<ProjectReference Include="..\Emby.Naming\Emby.Naming.csproj" />
<ProjectReference Include="..\Emby.Notifications\Emby.Notifications.csproj" />
+ <ProjectReference Include="..\Jellyfin.Versioning\Jellyfin.Versioning.csproj" />
<ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj" />
<ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj" />
<ProjectReference Include="..\MediaBrowser.Controller\MediaBrowser.Controller.csproj" />
@@ -30,7 +31,7 @@
</ItemGroup>
<ItemGroup>
- <Compile Include="..\SharedVersion.cs" />
+ <Compile Include="..\Jellyfin.Versioning\SharedVersion.cs" />
</ItemGroup>
<PropertyGroup>