소스 검색

Fix casing of JSON in Jellyfin API. Currently only affects startup wizard.

ZadenRB 5 년 전
부모
커밋
5a658cf260
2개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      Jellyfin.Api/Controllers/StartupController.cs
  2. 4 0
      Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs

+ 1 - 0
Jellyfin.Api/Controllers/StartupController.cs

@@ -6,6 +6,7 @@ using MediaBrowser.Controller.Configuration;
 using MediaBrowser.Controller.Library;
 using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json;
 
 namespace Jellyfin.Api.Controllers
 {

+ 4 - 0
Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs

@@ -71,6 +71,10 @@ namespace Jellyfin.Server.Extensions
                 // Clear app parts to avoid other assemblies being picked up
                 .ConfigureApplicationPartManager(a => a.ApplicationParts.Clear())
                 .AddApplicationPart(typeof(StartupController).Assembly)
+                .AddJsonOptions(options => 
+                {
+                    options.JsonSerializerOptions.PropertyNamingPolicy = null;
+                })
                 .AddControllersAsServices();
         }