Remove unneeded fields

This commit is contained in:
Bond_009
2019-01-20 14:25:13 +01:00
parent 8fc8fc0622
commit ca910325f3
5 changed files with 12 additions and 44 deletions

View File

@@ -4,7 +4,6 @@ using System.IO;
using System.Linq;
using System.Reflection;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Drawing;
using MediaBrowser.Controller.Extensions;
using MediaBrowser.Model.Drawing;
@@ -19,15 +18,13 @@ namespace Emby.Drawing
{
private readonly ILogger _logger;
private static IApplicationPaths _appPaths;
private readonly Func<IHttpClient> _httpClientFactory;
private readonly IFileSystem _fileSystem;
private static ILocalizationManager _localizationManager;
public SkiaEncoder(ILogger logger, IApplicationPaths appPaths, Func<IHttpClient> httpClientFactory, IFileSystem fileSystem, ILocalizationManager localizationManager)
public SkiaEncoder(ILogger logger, IApplicationPaths appPaths, IFileSystem fileSystem, ILocalizationManager localizationManager)
{
_logger = logger;
_appPaths = appPaths;
_httpClientFactory = httpClientFactory;
_fileSystem = fileSystem;
_localizationManager = localizationManager;
@@ -636,16 +633,16 @@ namespace Emby.Drawing
if (options.AddPlayedIndicator)
{
new PlayedIndicatorDrawer(_appPaths, _httpClientFactory(), _fileSystem).DrawPlayedIndicator(canvas, currentImageSize);
PlayedIndicatorDrawer.DrawPlayedIndicator(canvas, currentImageSize);
}
else if (options.UnplayedCount.HasValue)
{
new UnplayedCountIndicator(_appPaths, _httpClientFactory(), _fileSystem).DrawUnplayedCountIndicator(canvas, currentImageSize, options.UnplayedCount.Value);
UnplayedCountIndicator.DrawUnplayedCountIndicator(canvas, currentImageSize, options.UnplayedCount.Value);
}
if (options.PercentPlayed > 0)
{
new PercentPlayedDrawer().Process(canvas, currentImageSize, options.PercentPlayed);
PercentPlayedDrawer.Process(canvas, currentImageSize, options.PercentPlayed);
}
}
catch (Exception ex)