diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2020-01-08 01:21:09 +0900 |
|---|---|---|
| committer | dkanada <dkanada@users.noreply.github.com> | 2020-01-08 01:21:09 +0900 |
| commit | aca31457c06ea13042accd60e27ab61208a51577 (patch) | |
| tree | b734310d099f9b896ccce0b200ab96a3786d168b /MediaBrowser.Api/Images/ImageByNameService.cs | |
| parent | dee247453e7b5cab1badb6a844af690cdf80aacd (diff) | |
| parent | 0b592376d59d10d14dbdd248c24f7ec6397c3508 (diff) | |
merge branch master into media-attachments
Diffstat (limited to 'MediaBrowser.Api/Images/ImageByNameService.cs')
| -rw-r--r-- | MediaBrowser.Api/Images/ImageByNameService.cs | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/MediaBrowser.Api/Images/ImageByNameService.cs b/MediaBrowser.Api/Images/ImageByNameService.cs index 922bd8ed6..45b7d0c10 100644 --- a/MediaBrowser.Api/Images/ImageByNameService.cs +++ b/MediaBrowser.Api/Images/ImageByNameService.cs @@ -5,11 +5,13 @@ using System.Linq; using System.Threading.Tasks; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller; +using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Net; using MediaBrowser.Model.Dto; using MediaBrowser.Model.IO; using MediaBrowser.Model.Services; +using Microsoft.Extensions.Logging; namespace MediaBrowser.Api.Images { @@ -101,17 +103,19 @@ namespace MediaBrowser.Api.Images private readonly IServerApplicationPaths _appPaths; private readonly IFileSystem _fileSystem; - private readonly IHttpResultFactory _resultFactory; /// <summary> /// Initializes a new instance of the <see cref="ImageByNameService" /> class. /// </summary> - /// <param name="appPaths">The app paths.</param> - public ImageByNameService(IServerApplicationPaths appPaths, IFileSystem fileSystem, IHttpResultFactory resultFactory) + public ImageByNameService( + ILogger<ImageByNameService> logger, + IServerConfigurationManager serverConfigurationManager, + IHttpResultFactory resultFactory, + IFileSystem fileSystem) + : base(logger, serverConfigurationManager, resultFactory) { - _appPaths = appPaths; + _appPaths = serverConfigurationManager.ApplicationPaths; _fileSystem = fileSystem; - _resultFactory = resultFactory; } public object Get(GetMediaInfoImages request) @@ -187,7 +191,7 @@ namespace MediaBrowser.Api.Images var path = paths.FirstOrDefault(File.Exists) ?? paths.FirstOrDefault(); - return _resultFactory.GetStaticFileResult(Request, path); + return ResultFactory.GetStaticFileResult(Request, path); } /// <summary> @@ -207,7 +211,7 @@ namespace MediaBrowser.Api.Images if (!string.IsNullOrEmpty(path)) { - return _resultFactory.GetStaticFileResult(Request, path); + return ResultFactory.GetStaticFileResult(Request, path); } } @@ -224,7 +228,7 @@ namespace MediaBrowser.Api.Images if (!string.IsNullOrEmpty(path)) { - return _resultFactory.GetStaticFileResult(Request, path); + return ResultFactory.GetStaticFileResult(Request, path); } } @@ -247,7 +251,7 @@ namespace MediaBrowser.Api.Images if (!string.IsNullOrEmpty(path)) { - return _resultFactory.GetStaticFileResult(Request, path); + return ResultFactory.GetStaticFileResult(Request, path); } } @@ -263,7 +267,7 @@ namespace MediaBrowser.Api.Images if (!string.IsNullOrEmpty(path)) { - return _resultFactory.GetStaticFileResult(Request, path); + return ResultFactory.GetStaticFileResult(Request, path); } } |
