diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-01-01 18:41:02 +0100 |
|---|---|---|
| committer | Vasily <JustAMan@users.noreply.github.com> | 2019-01-02 02:30:59 +0300 |
| commit | a44936f97f8afc2817d3491615a7cfe1e31c251c (patch) | |
| tree | c7a621ff4a04cf3a7d471bc2c8df22a4681f1266 /Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs | |
| parent | 75efe9cf0a15b6871726a4c2e8802e2af88cf1d1 (diff) | |
Fix and improve logging
Diffstat (limited to 'Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs')
| -rw-r--r-- | Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs b/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs index ad941de55..5cff2dff0 100644 --- a/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs +++ b/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs @@ -5,6 +5,7 @@ using System.Runtime.InteropServices; namespace Emby.Server.Implementations.EnvironmentInfo { + // TODO: Rework @bond public class EnvironmentInfo : IEnvironmentInfo { private MediaBrowser.Model.System.OperatingSystem? _customOperatingSystem; @@ -40,7 +41,14 @@ namespace Emby.Server.Implementations.EnvironmentInfo { get { - return Environment.OSVersion.Platform.ToString(); + switch (OperatingSystem) { + case MediaBrowser.Model.System.OperatingSystem.Android: return "Android"; + case MediaBrowser.Model.System.OperatingSystem.BSD: return "BSD"; + case MediaBrowser.Model.System.OperatingSystem.Linux: return "Linux"; + case MediaBrowser.Model.System.OperatingSystem.OSX: return "macOS"; + case MediaBrowser.Model.System.OperatingSystem.Windows: return "Windows"; + default: throw new Exception($"Unknown OS {OperatingSystem}"); + } } } |
