mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-24 09:37:54 +01:00
Merge branch 'master' into RemoteAccessFix
This commit is contained in:
@@ -225,7 +225,7 @@ namespace Jellyfin.Server.Extensions
|
||||
.AddJsonOptions(options =>
|
||||
{
|
||||
// Update all properties that are set in JsonDefaults
|
||||
var jsonOptions = JsonDefaults.GetPascalCaseOptions();
|
||||
var jsonOptions = JsonDefaults.PascalCaseOptions;
|
||||
|
||||
// From JsonDefaults
|
||||
options.JsonSerializerOptions.ReadCommentHandling = jsonOptions.ReadCommentHandling;
|
||||
@@ -260,15 +260,16 @@ namespace Jellyfin.Server.Extensions
|
||||
{
|
||||
return serviceCollection.AddSwaggerGen(c =>
|
||||
{
|
||||
var version = typeof(ApplicationHost).Assembly.GetName().Version?.ToString() ?? "0.0.0.1";
|
||||
c.SwaggerDoc("api-docs", new OpenApiInfo
|
||||
{
|
||||
Title = "Jellyfin API",
|
||||
Version = "v1",
|
||||
Version = version,
|
||||
Extensions = new Dictionary<string, IOpenApiExtension>
|
||||
{
|
||||
{
|
||||
"x-jellyfin-version",
|
||||
new OpenApiString(typeof(ApplicationHost).Assembly.GetName().Version?.ToString())
|
||||
new OpenApiString(version)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -25,6 +25,8 @@ namespace Jellyfin.Server.Filters
|
||||
context.SchemaGenerator.GenerateSchema(typeof(GeneralCommandType), context.SchemaRepository);
|
||||
|
||||
context.SchemaGenerator.GenerateSchema(typeof(GroupUpdate<object>), context.SchemaRepository);
|
||||
|
||||
context.SchemaGenerator.GenerateSchema(typeof(SessionMessageType), context.SchemaRepository);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Jellyfin.Server.Formatters
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CamelCaseJsonProfileFormatter"/> class.
|
||||
/// </summary>
|
||||
public CamelCaseJsonProfileFormatter() : base(JsonDefaults.GetCamelCaseOptions())
|
||||
public CamelCaseJsonProfileFormatter() : base(JsonDefaults.CamelCaseOptions)
|
||||
{
|
||||
SupportedMediaTypes.Clear();
|
||||
SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(JsonDefaults.CamelCaseMediaType));
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Jellyfin.Server.Formatters
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PascalCaseJsonProfileFormatter"/> class.
|
||||
/// </summary>
|
||||
public PascalCaseJsonProfileFormatter() : base(JsonDefaults.GetPascalCaseOptions())
|
||||
public PascalCaseJsonProfileFormatter() : base(JsonDefaults.PascalCaseOptions)
|
||||
{
|
||||
SupportedMediaTypes.Clear();
|
||||
// Add application/json for default formatter
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<Nullable>enable</Nullable>
|
||||
<DisableImplicitAspNetCoreAnalyzers>true</DisableImplicitAspNetCoreAnalyzers>
|
||||
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
|
||||
<CodeAnalysisRuleSet>../jellyfin.ruleset</CodeAnalysisRuleSet>
|
||||
<!-- <DisableImplicitAspNetCoreAnalyzers>true</DisableImplicitAspNetCoreAnalyzers> -->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -31,10 +33,6 @@
|
||||
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<CodeAnalysisRuleSet>../jellyfin.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommandLineParser" Version="2.8.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="5.0.0" />
|
||||
|
||||
@@ -16,9 +16,12 @@ namespace Jellyfin.Server.Migrations
|
||||
Applied = new List<(Guid Id, string Name)>();
|
||||
}
|
||||
|
||||
// .Net xml serializer can't handle interfaces
|
||||
#pragma warning disable CA1002 // Do not expose generic lists
|
||||
/// <summary>
|
||||
/// Gets the list of applied migration routine names.
|
||||
/// </summary>
|
||||
public List<(Guid Id, string Name)> Applied { get; }
|
||||
#pragma warning restore CA1002
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Emby.Server.Implementations.Data;
|
||||
using Emby.Server.Implementations.Serialization;
|
||||
using Jellyfin.Data.Entities;
|
||||
@@ -76,7 +74,7 @@ namespace Jellyfin.Server.Migrations.Routines
|
||||
|
||||
foreach (var entry in queryResult)
|
||||
{
|
||||
UserMockup? mockup = JsonSerializer.Deserialize<UserMockup>(entry[2].ToBlob(), JsonDefaults.GetOptions());
|
||||
UserMockup? mockup = JsonSerializer.Deserialize<UserMockup>(entry[2].ToBlob(), JsonDefaults.Options);
|
||||
if (mockup == null)
|
||||
{
|
||||
continue;
|
||||
@@ -104,7 +102,7 @@ namespace Jellyfin.Server.Migrations.Routines
|
||||
_ => policy.LoginAttemptsBeforeLockout
|
||||
};
|
||||
|
||||
var user = new User(mockup.Name, policy.AuthenticationProviderId, policy.PasswordResetProviderId)
|
||||
var user = new User(mockup.Name, policy.AuthenticationProviderId!, policy.PasswordResetProviderId!)
|
||||
{
|
||||
Id = entry[1].ReadGuidFromBlob(),
|
||||
InternalId = entry[0].ToInt64(),
|
||||
|
||||
@@ -222,7 +222,7 @@ namespace Jellyfin.Server
|
||||
}
|
||||
finally
|
||||
{
|
||||
appHost?.Dispose();
|
||||
appHost.Dispose();
|
||||
}
|
||||
|
||||
if (_restartOnShutdown)
|
||||
@@ -623,7 +623,7 @@ namespace Jellyfin.Server
|
||||
string commandLineArgsString;
|
||||
if (options.RestartArgs != null)
|
||||
{
|
||||
commandLineArgsString = options.RestartArgs ?? string.Empty;
|
||||
commandLineArgsString = options.RestartArgs;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user