mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-07 16:28:56 +01:00
Merge remote-tracking branch 'upstream/master' into remove-common-process
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using MediaBrowser.Model.Configuration;
|
||||
|
||||
namespace MediaBrowser.Common.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
@@ -12,9 +14,12 @@ namespace MediaBrowser.Common.Configuration
|
||||
string ProgramDataPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the web UI resources folder
|
||||
/// Gets the path to the web UI resources folder.
|
||||
/// </summary>
|
||||
/// <value>The web UI resources path.</value>
|
||||
/// <remarks>
|
||||
/// This value is not relevant if the server is configured to not host any static web content. Additionally,
|
||||
/// the value for <see cref="ServerConfiguration.DashboardSourcePath"/> takes precedence over this one.
|
||||
/// </remarks>
|
||||
string WebPath { get; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace MediaBrowser.Common.Cryptography
|
||||
/// <summary>
|
||||
/// Class containing extension methods for working with Jellyfin cryptography objects.
|
||||
/// </summary>
|
||||
public static class Extensions
|
||||
public static class CryptoExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="PasswordHash" /> instance.
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
<!-- Code analyzers-->
|
||||
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<!-- <PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8" PrivateAssets="All" /> -->
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8" PrivateAssets="All" />
|
||||
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" />
|
||||
<!-- <PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" /> -->
|
||||
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" />
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace MediaBrowser.Common.Net
|
||||
RequestHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
CacheMode = CacheMode.None;
|
||||
DecompressionMethod = CompressionMethod.Deflate;
|
||||
DecompressionMethod = CompressionMethods.Deflate;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -29,7 +29,7 @@ namespace MediaBrowser.Common.Net
|
||||
/// <value>The URL.</value>
|
||||
public string Url { get; set; }
|
||||
|
||||
public CompressionMethod DecompressionMethod { get; set; }
|
||||
public CompressionMethods DecompressionMethod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the accept header.
|
||||
@@ -83,8 +83,6 @@ namespace MediaBrowser.Common.Net
|
||||
|
||||
public string RequestContent { get; set; }
|
||||
|
||||
public byte[] RequestContentBytes { get; set; }
|
||||
|
||||
public bool BufferContent { get; set; }
|
||||
|
||||
public bool LogErrorResponseBody { get; set; }
|
||||
@@ -112,7 +110,7 @@ namespace MediaBrowser.Common.Net
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum CompressionMethod
|
||||
public enum CompressionMethods
|
||||
{
|
||||
None = 0b00000001,
|
||||
Deflate = 0b00000010,
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace MediaBrowser.Common.Net
|
||||
/// <summary>
|
||||
/// Class HttpResponseInfo.
|
||||
/// </summary>
|
||||
public class HttpResponseInfo : IDisposable
|
||||
public sealed class HttpResponseInfo : IDisposable
|
||||
{
|
||||
#pragma warning disable CS1591
|
||||
public HttpResponseInfo()
|
||||
@@ -22,7 +22,6 @@ namespace MediaBrowser.Common.Net
|
||||
}
|
||||
|
||||
#pragma warning restore CS1591
|
||||
#pragma warning restore SA1600
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the content.
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace MediaBrowser.Common.System
|
||||
case OperatingSystemId.Linux: return "Linux";
|
||||
case OperatingSystemId.Darwin: return "macOS";
|
||||
case OperatingSystemId.Windows: return "Windows";
|
||||
default: throw new Exception($"Unknown OS {Id}");
|
||||
default: throw new PlatformNotSupportedException($"Unknown OS {Id}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,20 +53,20 @@ namespace MediaBrowser.Common.System
|
||||
default:
|
||||
{
|
||||
string osDescription = RuntimeInformation.OSDescription;
|
||||
if (osDescription.IndexOf("linux", StringComparison.OrdinalIgnoreCase) != -1)
|
||||
if (osDescription.Contains("linux", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return OperatingSystemId.Linux;
|
||||
}
|
||||
else if (osDescription.IndexOf("darwin", StringComparison.OrdinalIgnoreCase) != -1)
|
||||
else if (osDescription.Contains("darwin", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return OperatingSystemId.Darwin;
|
||||
}
|
||||
else if (osDescription.IndexOf("bsd", StringComparison.OrdinalIgnoreCase) != -1)
|
||||
else if (osDescription.Contains("bsd", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return OperatingSystemId.BSD;
|
||||
}
|
||||
|
||||
throw new Exception($"Can't resolve OS with description: '{osDescription}'");
|
||||
throw new PlatformNotSupportedException($"Can't resolve OS with description: '{osDescription}'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user