mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-27 20:41:54 +00:00
add fixes for .net core
This commit is contained in:
@@ -6,16 +6,16 @@ namespace Emby.Server.Implementations.EnvironmentInfo
|
||||
{
|
||||
public class EnvironmentInfo : IEnvironmentInfo
|
||||
{
|
||||
public Architecture? CustomArchitecture { get; set; }
|
||||
public MediaBrowser.Model.System.OperatingSystem? CustomOperatingSystem { get; set; }
|
||||
private Architecture? _customArchitecture;
|
||||
private MediaBrowser.Model.System.OperatingSystem? _customOperatingSystem;
|
||||
|
||||
public virtual MediaBrowser.Model.System.OperatingSystem OperatingSystem
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CustomOperatingSystem.HasValue)
|
||||
if (_customOperatingSystem.HasValue)
|
||||
{
|
||||
return CustomOperatingSystem.Value;
|
||||
return _customOperatingSystem.Value;
|
||||
}
|
||||
|
||||
switch (Environment.OSVersion.Platform)
|
||||
@@ -30,6 +30,10 @@ namespace Emby.Server.Implementations.EnvironmentInfo
|
||||
|
||||
return MediaBrowser.Model.System.OperatingSystem.Windows;
|
||||
}
|
||||
set
|
||||
{
|
||||
_customOperatingSystem = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string OperatingSystemName
|
||||
@@ -60,13 +64,17 @@ namespace Emby.Server.Implementations.EnvironmentInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CustomArchitecture.HasValue)
|
||||
if (_customArchitecture.HasValue)
|
||||
{
|
||||
return CustomArchitecture.Value;
|
||||
return _customArchitecture.Value;
|
||||
}
|
||||
|
||||
return Environment.Is64BitOperatingSystem ? MediaBrowser.Model.System.Architecture.X64 : MediaBrowser.Model.System.Architecture.X86;
|
||||
}
|
||||
set
|
||||
{
|
||||
_customArchitecture = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string GetEnvironmentVariable(string name)
|
||||
|
||||
Reference in New Issue
Block a user