mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-07 08:18:54 +01:00
update core projects
This commit is contained in:
@@ -9,6 +9,8 @@ namespace Emby.Common.Implementations.EnvironmentInfo
|
||||
{
|
||||
public class EnvironmentInfo : IEnvironmentInfo
|
||||
{
|
||||
public MediaBrowser.Model.System.Architecture? CustomArchitecture { get; set; }
|
||||
|
||||
public MediaBrowser.Model.System.OperatingSystem OperatingSystem
|
||||
{
|
||||
get
|
||||
@@ -66,5 +68,32 @@ namespace Emby.Common.Implementations.EnvironmentInfo
|
||||
return "1.0";
|
||||
}
|
||||
}
|
||||
|
||||
public MediaBrowser.Model.System.Architecture SystemArchitecture
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CustomArchitecture.HasValue)
|
||||
{
|
||||
return CustomArchitecture.Value;
|
||||
}
|
||||
#if NET46
|
||||
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:
|
||||
return MediaBrowser.Model.System.Architecture.Arm;
|
||||
case System.Runtime.InteropServices.Architecture.Arm64:
|
||||
return MediaBrowser.Model.System.Architecture.Arm64;
|
||||
case System.Runtime.InteropServices.Architecture.X64:
|
||||
return MediaBrowser.Model.System.Architecture.X64;
|
||||
case System.Runtime.InteropServices.Architecture.X86:
|
||||
return MediaBrowser.Model.System.Architecture.X86;
|
||||
}
|
||||
#endif
|
||||
return MediaBrowser.Model.System.Architecture.X64;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user