diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-12-10 23:00:59 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2019-12-10 23:00:59 +0100 |
| commit | 0bf8bfbb0cfd67b387a574148022f3c554ff5173 (patch) | |
| tree | 34f12fcce7b688fc50d377f90dbccc343e03b310 /MediaBrowser.Api/BrandingService.cs | |
| parent | c6d48f51f608601775d98fc7866eefc367bfd63b (diff) | |
| parent | 67922dff50967c02e8c0c10f43884fd4e788b012 (diff) | |
Merge branch 'master' into mediaencoding
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"); |
