From e0edbc5754ad4d6afad1f01874ca2085d4f0791d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Mon, 29 Mar 2021 00:46:19 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Claus Vium --- Emby.Drawing/ImageProcessor.cs | 2 +- MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs index 646620c43..78b53f36a 100644 --- a/Emby.Drawing/ImageProcessor.cs +++ b/Emby.Drawing/ImageProcessor.cs @@ -274,7 +274,7 @@ namespace Emby.Drawing string backgroundColor, string foregroundLayer) { - System.Text.StringBuilder filename = new System.Text.StringBuilder(128); + var filename = new StringBuilder(128); filename.Append(originalPath); filename.Append(",quality="); diff --git a/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs b/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs index e1a2811ac..230a0af60 100644 --- a/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs +++ b/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs @@ -97,12 +97,7 @@ namespace MediaBrowser.Controller.Drawing return false; } - if (FillWidth.HasValue && sizeValue.Width > FillWidth.Value) - { - return false; - } - - if (FillHeight.HasValue && sizeValue.Height > FillHeight.Value) + if (sizeValue.Width > FillWidth || sizeValue.Height > FillHeight) { return false; }