From 14b785d188647ae896c5d20869ab6bcc967fcfc2 Mon Sep 17 00:00:00 2001 From: KGT1 Date: Tue, 1 Apr 2025 01:46:01 +0200 Subject: Preserve SplashscreenLocation when updating branding config (#13756) * add BrandingOptionsDto and add branding endpoints * refactor new HttpGet Configuration Branding into existing API calls * Add BrandingOptions to _ignoredConfigurations for openAPI * rename BrandOptionsDto to BrandingOptionsDto --- MediaBrowser.Model/Branding/BrandingOptions.cs | 7 ------- MediaBrowser.Model/Branding/BrandingOptionsDto.cs | 25 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 MediaBrowser.Model/Branding/BrandingOptionsDto.cs (limited to 'MediaBrowser.Model') diff --git a/MediaBrowser.Model/Branding/BrandingOptions.cs b/MediaBrowser.Model/Branding/BrandingOptions.cs index c6580598b..5ec6b0dd4 100644 --- a/MediaBrowser.Model/Branding/BrandingOptions.cs +++ b/MediaBrowser.Model/Branding/BrandingOptions.cs @@ -1,5 +1,3 @@ -using System.Text.Json.Serialization; - namespace MediaBrowser.Model.Branding; /// @@ -27,10 +25,5 @@ public class BrandingOptions /// /// Gets or sets the splashscreen location on disk. /// - /// - /// Not served via the API. - /// Only used to save the custom uploaded user splashscreen in the configuration file. - /// - [JsonIgnore] public string? SplashscreenLocation { get; set; } } diff --git a/MediaBrowser.Model/Branding/BrandingOptionsDto.cs b/MediaBrowser.Model/Branding/BrandingOptionsDto.cs new file mode 100644 index 000000000..c0d8cb31c --- /dev/null +++ b/MediaBrowser.Model/Branding/BrandingOptionsDto.cs @@ -0,0 +1,25 @@ +namespace MediaBrowser.Model.Branding; + +/// +/// The branding options DTO for API use. +/// This DTO excludes SplashscreenLocation to prevent it from being updated via API. +/// +public class BrandingOptionsDto +{ + /// + /// Gets or sets the login disclaimer. + /// + /// The login disclaimer. + public string? LoginDisclaimer { get; set; } + + /// + /// Gets or sets the custom CSS. + /// + /// The custom CSS. + public string? CustomCss { get; set; } + + /// + /// Gets or sets a value indicating whether to enable the splashscreen. + /// + public bool SplashscreenEnabled { get; set; } = false; +} -- cgit v1.2.3