diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-12-18 11:53:41 +0100 |
|---|---|---|
| committer | Bond-009 <bond.009@outlook.com> | 2019-12-18 11:53:41 +0100 |
| commit | a1ca50fd5a74eafa6e609976d90cad42b54137e5 (patch) | |
| tree | 9c64d6914c27a8d7e2f8e6f71d7a5952197705cf /MediaBrowser.Api/BrandingService.cs | |
| parent | 8723bdbb4fb73ed261ac1ba3b6932773e523d78b (diff) | |
| parent | 6b185119aa329764c1ccc57d9be3e81f05680b69 (diff) | |
Merge branch 'namingtests' of https://github.com/Bond-009/jellyfin into namingtests
Diffstat (limited to 'MediaBrowser.Api/BrandingService.cs')
| -rw-r--r-- | MediaBrowser.Api/BrandingService.cs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/MediaBrowser.Api/BrandingService.cs b/MediaBrowser.Api/BrandingService.cs index f5845f4e0..f4724e774 100644 --- a/MediaBrowser.Api/BrandingService.cs +++ b/MediaBrowser.Api/BrandingService.cs @@ -1,6 +1,9 @@ using MediaBrowser.Common.Configuration; +using MediaBrowser.Controller.Configuration; +using MediaBrowser.Controller.Net; using MediaBrowser.Model.Branding; using MediaBrowser.Model.Services; +using Microsoft.Extensions.Logging; namespace MediaBrowser.Api { @@ -17,21 +20,22 @@ namespace MediaBrowser.Api public class BrandingService : BaseApiService { - private readonly IConfigurationManager _config; - - public BrandingService(IConfigurationManager config) + public BrandingService( + ILogger<BrandingService> logger, + IServerConfigurationManager serverConfigurationManager, + IHttpResultFactory httpResultFactory) + : base(logger, serverConfigurationManager, httpResultFactory) { - _config = config; } public object Get(GetBrandingOptions request) { - return _config.GetConfiguration<BrandingOptions>("branding"); + return ServerConfigurationManager.GetConfiguration<BrandingOptions>("branding"); } public object Get(GetBrandingCss request) { - var result = _config.GetConfiguration<BrandingOptions>("branding"); + var result = ServerConfigurationManager.GetConfiguration<BrandingOptions>("branding"); // When null this throws a 405 error under Mono OSX, so default to empty string return ResultFactory.GetResult(Request, result.CustomCss ?? string.Empty, "text/css"); |
