mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Visual Studio Reformat: Jellyfin.Server
This commit is contained in:
parent
80691e53b0
commit
f0acc0446c
@ -28,7 +28,7 @@ namespace Jellyfin.Server
|
|||||||
protected override void RestartInternal() => Program.Restart();
|
protected override void RestartInternal() => Program.Restart();
|
||||||
|
|
||||||
protected override IEnumerable<Assembly> GetAssembliesWithPartsInternal()
|
protected override IEnumerable<Assembly> GetAssembliesWithPartsInternal()
|
||||||
=> new [] { typeof(CoreAppHost).Assembly };
|
=> new[] { typeof(CoreAppHost).Assembly };
|
||||||
|
|
||||||
protected override void ShutdownInternal() => Program.Shutdown();
|
protected override void ShutdownInternal() => Program.Shutdown();
|
||||||
|
|
||||||
|
@ -16,8 +16,8 @@ using Emby.Server.Implementations.Networking;
|
|||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.Configuration;
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
using MediaBrowser.Controller.Drawing;
|
using MediaBrowser.Controller.Drawing;
|
||||||
using MediaBrowser.Model.IO;
|
|
||||||
using MediaBrowser.Model.Globalization;
|
using MediaBrowser.Model.Globalization;
|
||||||
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.System;
|
using MediaBrowser.Model.System;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
@ -228,7 +228,8 @@ namespace Jellyfin.Server
|
|||||||
return new NullImageEncoder();
|
return new NullImageEncoder();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static MediaBrowser.Model.System.OperatingSystem getOperatingSystem() {
|
private static MediaBrowser.Model.System.OperatingSystem getOperatingSystem()
|
||||||
|
{
|
||||||
switch (Environment.OSVersion.Platform)
|
switch (Environment.OSVersion.Platform)
|
||||||
{
|
{
|
||||||
case PlatformID.MacOSX:
|
case PlatformID.MacOSX:
|
||||||
@ -237,22 +238,22 @@ namespace Jellyfin.Server
|
|||||||
return MediaBrowser.Model.System.OperatingSystem.Windows;
|
return MediaBrowser.Model.System.OperatingSystem.Windows;
|
||||||
case PlatformID.Unix:
|
case PlatformID.Unix:
|
||||||
default:
|
default:
|
||||||
{
|
|
||||||
string osDescription = RuntimeInformation.OSDescription;
|
|
||||||
if (osDescription.Contains("linux", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
{
|
||||||
return MediaBrowser.Model.System.OperatingSystem.Linux;
|
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}'");
|
||||||
}
|
}
|
||||||
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}'");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -287,7 +288,7 @@ namespace Jellyfin.Server
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
commandLineArgsString = string .Join(" ",
|
commandLineArgsString = string.Join(" ",
|
||||||
Environment.GetCommandLineArgs()
|
Environment.GetCommandLineArgs()
|
||||||
.Skip(1)
|
.Skip(1)
|
||||||
.Select(NormalizeCommandLineArgument)
|
.Select(NormalizeCommandLineArgument)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Net.WebSockets;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Net.WebSockets;
|
|
||||||
using Emby.Server.Implementations.Net;
|
using Emby.Server.Implementations.Net;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@ using System.Collections.Generic;
|
|||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Emby.Server.Implementations.Net;
|
|
||||||
using Emby.Server.Implementations.HttpServer;
|
using Emby.Server.Implementations.HttpServer;
|
||||||
|
using Emby.Server.Implementations.Net;
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
using MediaBrowser.Controller.Net;
|
using MediaBrowser.Controller.Net;
|
||||||
using MediaBrowser.Model.Cryptography;
|
using MediaBrowser.Model.Cryptography;
|
||||||
|
@ -425,7 +425,7 @@ namespace Jellyfin.SocketSharp
|
|||||||
cookies = new Dictionary<string, System.Net.Cookie>();
|
cookies = new Dictionary<string, System.Net.Cookie>();
|
||||||
foreach (var cookie in this.request.Cookies)
|
foreach (var cookie in this.request.Cookies)
|
||||||
{
|
{
|
||||||
var httpCookie = (System.Net.Cookie) cookie;
|
var httpCookie = (System.Net.Cookie)cookie;
|
||||||
cookies[httpCookie.Name] = new System.Net.Cookie(httpCookie.Name, httpCookie.Value, httpCookie.Path, httpCookie.Domain);
|
cookies[httpCookie.Name] = new System.Net.Cookie(httpCookie.Name, httpCookie.Value, httpCookie.Path, httpCookie.Domain);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user