diff options
| author | Andrew Rabert <6550543+nvllsvm@users.noreply.github.com> | 2019-01-20 20:49:51 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-20 20:49:51 -0500 |
| commit | edcfd8b565f632088c8b1f826db8e2fbecf9790d (patch) | |
| tree | 26d7da95fe3e3b2772b8b39a2463a6c0ac7652fc /Emby.Drawing/SkiaEncoder.cs | |
| parent | 803bf563d74754139ff92810364262e3181e399d (diff) | |
| parent | 7327bb91a3bffd1631ffc7368d82d05b286a7f4b (diff) | |
Merge pull request #631 from Bond-009/imagesize
Cleanup ImageProcessor and SkiaEncoder
Diffstat (limited to 'Emby.Drawing/SkiaEncoder.cs')
| -rw-r--r-- | Emby.Drawing/SkiaEncoder.cs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Emby.Drawing/SkiaEncoder.cs b/Emby.Drawing/SkiaEncoder.cs index 309d72711..87e0eca21 100644 --- a/Emby.Drawing/SkiaEncoder.cs +++ b/Emby.Drawing/SkiaEncoder.cs @@ -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,20 +18,17 @@ 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( ILoggerFactory loggerFactory, IApplicationPaths appPaths, - Func<IHttpClient> httpClientFactory, IFileSystem fileSystem, ILocalizationManager localizationManager) { _logger = loggerFactory.CreateLogger("ImageEncoder"); _appPaths = appPaths; - _httpClientFactory = httpClientFactory; _fileSystem = fileSystem; _localizationManager = localizationManager; @@ -641,16 +637,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) |
