fix: restore os name in GetPublicSystemInfo endpoint

This is still used by clients to show platform-specific hardware acceleration options, restore the os name for now.

Signed-off-by: gnattu <gnattuoc@me.com>
pull/11388/head
gnattu 1 month ago
parent 81d3758785
commit 58def22f9f

@ -1,3 +1,4 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using MediaBrowser.Common.Configuration;
@ -78,6 +79,7 @@ public class SystemManager : ISystemManager
{
Version = _applicationHost.ApplicationVersionString,
ProductName = _applicationHost.Name,
OperatingSystem = GetServerOs(),
Id = _applicationHost.SystemId,
ServerName = _applicationHost.FriendlyName,
LocalAddress = _applicationHost.GetSmartApiUrl(request),
@ -100,4 +102,24 @@ public class SystemManager : ISystemManager
_applicationLifetime.StopApplication();
});
}
private static string GetServerOs()
{
if (OperatingSystem.IsLinux())
{
return "Linux";
}
if (OperatingSystem.IsWindows())
{
return "Windows";
}
if (OperatingSystem.IsMacOS())
{
return "macOS";
}
return "Others";
}
}

@ -34,7 +34,6 @@ namespace MediaBrowser.Model.System
/// Gets or sets the operating system.
/// </summary>
/// <value>The operating system.</value>
[Obsolete("This is no longer set")]
public string OperatingSystem { get; set; } = string.Empty;
/// <summary>

Loading…
Cancel
Save