aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Images/ImageByNameService.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-12-18 11:53:41 +0100
committerBond-009 <bond.009@outlook.com>2019-12-18 11:53:41 +0100
commita1ca50fd5a74eafa6e609976d90cad42b54137e5 (patch)
tree9c64d6914c27a8d7e2f8e6f71d7a5952197705cf /MediaBrowser.Api/Images/ImageByNameService.cs
parent8723bdbb4fb73ed261ac1ba3b6932773e523d78b (diff)
parent6b185119aa329764c1ccc57d9be3e81f05680b69 (diff)
Merge branch 'namingtests' of https://github.com/Bond-009/jellyfin into namingtests
Diffstat (limited to 'MediaBrowser.Api/Images/ImageByNameService.cs')
-rw-r--r--MediaBrowser.Api/Images/ImageByNameService.cs24
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);
}
}