Explorar o código

Apply suggestions from code review

Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
Odd Stråbø %!s(int64=4) %!d(string=hai) anos
pai
achega
e0edbc5754

+ 1 - 1
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=");

+ 1 - 6
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;
             }