diff options
| author | Andrew Rabert <6550543+nvllsvm@users.noreply.github.com> | 2019-01-19 15:11:50 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-19 15:11:50 -0500 |
| commit | 55538764fa06a64795c099fc6496df9dbb4156bd (patch) | |
| tree | 8c1f94861ecebdf634b70a7265945b6f8f13aff1 /Jellyfin.Server/Program.cs | |
| parent | 3b52035ee064a5d9aa215d9515211d4508585d39 (diff) | |
| parent | c5430f86b0b5863482e7c4f7e55a79c7d88c133b (diff) | |
Merge pull request #575 from EraYaN/reformat
Reformat all C# server code to conform with code standards
Diffstat (limited to 'Jellyfin.Server/Program.cs')
| -rw-r--r-- | Jellyfin.Server/Program.cs | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index 46a80b492..51ad53749 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -17,8 +17,8 @@ using Emby.Server.Implementations.Networking; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Net; using MediaBrowser.Controller.Drawing; -using MediaBrowser.Model.IO; using MediaBrowser.Model.Globalization; +using MediaBrowser.Model.IO; using MediaBrowser.Model.System; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; @@ -278,7 +278,8 @@ namespace Jellyfin.Server return new NullImageEncoder(); } - private static MediaBrowser.Model.System.OperatingSystem getOperatingSystem() { + private static MediaBrowser.Model.System.OperatingSystem getOperatingSystem() + { switch (Environment.OSVersion.Platform) { case PlatformID.MacOSX: @@ -287,22 +288,22 @@ namespace Jellyfin.Server return MediaBrowser.Model.System.OperatingSystem.Windows; case PlatformID.Unix: default: - { - string osDescription = RuntimeInformation.OSDescription; - if (osDescription.Contains("linux", StringComparison.OrdinalIgnoreCase)) - { - return MediaBrowser.Model.System.OperatingSystem.Linux; - } - else if (osDescription.Contains("darwin", StringComparison.OrdinalIgnoreCase)) - { - return MediaBrowser.Model.System.OperatingSystem.OSX; - } - else if (osDescription.Contains("bsd", StringComparison.OrdinalIgnoreCase)) { - return MediaBrowser.Model.System.OperatingSystem.BSD; + string osDescription = RuntimeInformation.OSDescription; + if (osDescription.Contains("linux", StringComparison.OrdinalIgnoreCase)) + { + return MediaBrowser.Model.System.OperatingSystem.Linux; + } + else if (osDescription.Contains("darwin", StringComparison.OrdinalIgnoreCase)) + { + return MediaBrowser.Model.System.OperatingSystem.OSX; + } + else if (osDescription.Contains("bsd", StringComparison.OrdinalIgnoreCase)) + { + return MediaBrowser.Model.System.OperatingSystem.BSD; + } + throw new Exception($"Can't resolve OS with description: '{osDescription}'"); } - throw new Exception($"Can't resolve OS with description: '{osDescription}'"); - } } } @@ -340,7 +341,7 @@ namespace Jellyfin.Server } else { - commandLineArgsString = string .Join(" ", + commandLineArgsString = string.Join(" ", Environment.GetCommandLineArgs() .Skip(1) .Select(NormalizeCommandLineArgument) |
