|
|
@ -22,19 +22,30 @@ namespace Emby.Common.Implementations.EnvironmentInfo
|
|
|
|
return CustomOperatingSystem.Value;
|
|
|
|
return CustomOperatingSystem.Value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
|
|
|
#if NET46
|
|
|
|
|
|
|
|
switch (Environment.OSVersion.Platform)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
case PlatformID.MacOSX:
|
|
|
|
return MediaBrowser.Model.System.OperatingSystem.OSX;
|
|
|
|
return MediaBrowser.Model.System.OperatingSystem.OSX;
|
|
|
|
|
|
|
|
case PlatformID.Win32NT:
|
|
|
|
|
|
|
|
return MediaBrowser.Model.System.OperatingSystem.Windows;
|
|
|
|
|
|
|
|
case PlatformID.Unix:
|
|
|
|
|
|
|
|
return MediaBrowser.Model.System.OperatingSystem.Linux;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#elif NETSTANDARD1_6
|
|
|
|
|
|
|
|
if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return OperatingSystem.OSX;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
|
|
|
if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return MediaBrowser.Model.System.OperatingSystem.Windows;
|
|
|
|
return OperatingSystem.Windows;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
|
|
|
if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return MediaBrowser.Model.System.OperatingSystem.Linux;
|
|
|
|
return OperatingSystem.Linux;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
return MediaBrowser.Model.System.OperatingSystem.Windows;
|
|
|
|
return MediaBrowser.Model.System.OperatingSystem.Windows;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -43,7 +54,12 @@ namespace Emby.Common.Implementations.EnvironmentInfo
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get
|
|
|
|
get
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
#if NET46
|
|
|
|
|
|
|
|
return Environment.OSVersion.Platform.ToString();
|
|
|
|
|
|
|
|
#elif NETSTANDARD1_6
|
|
|
|
return System.Runtime.InteropServices.RuntimeInformation.OSDescription;
|
|
|
|
return System.Runtime.InteropServices.RuntimeInformation.OSDescription;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return "Operating System";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -51,7 +67,12 @@ namespace Emby.Common.Implementations.EnvironmentInfo
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get
|
|
|
|
get
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
#if NET46
|
|
|
|
|
|
|
|
return Environment.OSVersion.Version.ToString() + " " + Environment.OSVersion.ServicePack.ToString();
|
|
|
|
|
|
|
|
#elif NETSTANDARD1_6
|
|
|
|
return System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription;
|
|
|
|
return System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return "1.0";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -71,8 +92,10 @@ namespace Emby.Common.Implementations.EnvironmentInfo
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return CustomArchitecture.Value;
|
|
|
|
return CustomArchitecture.Value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#if NET46
|
|
|
|
switch (System.Runtime.InteropServices.RuntimeInformation.OSArchitecture)
|
|
|
|
return Environment.Is64BitOperatingSystem ? MediaBrowser.Model.System.Architecture.X64 : MediaBrowser.Model.System.Architecture.X86;
|
|
|
|
|
|
|
|
#elif NETSTANDARD1_6
|
|
|
|
|
|
|
|
switch(System.Runtime.InteropServices.RuntimeInformation.OSArchitecture)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case System.Runtime.InteropServices.Architecture.Arm:
|
|
|
|
case System.Runtime.InteropServices.Architecture.Arm:
|
|
|
|
return MediaBrowser.Model.System.Architecture.Arm;
|
|
|
|
return MediaBrowser.Model.System.Architecture.Arm;
|
|
|
@ -83,6 +106,7 @@ namespace Emby.Common.Implementations.EnvironmentInfo
|
|
|
|
case System.Runtime.InteropServices.Architecture.X86:
|
|
|
|
case System.Runtime.InteropServices.Architecture.X86:
|
|
|
|
return MediaBrowser.Model.System.Architecture.X86;
|
|
|
|
return MediaBrowser.Model.System.Architecture.X86;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
return MediaBrowser.Model.System.Architecture.X64;
|
|
|
|
return MediaBrowser.Model.System.Architecture.X64;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|