Kaynağa Gözat

handle x-png

Luke Pulverenti 8 yıl önce
ebeveyn
işleme
b7c6ffe013

+ 1 - 0
MediaBrowser.Model/Net/MimeTypes.cs

@@ -100,6 +100,7 @@ namespace MediaBrowser.Model.Net
                 .ToDictionary(x => x.Key, x => x.First().Key, StringComparer.OrdinalIgnoreCase);
 
             dict["image/jpg"] = ".jpg";
+            dict["image/x-png"] = ".png";
 
             return dict;
         }

+ 5 - 0
MediaBrowser.Providers/Manager/ImageSaver.cs

@@ -356,6 +356,11 @@ namespace MediaBrowser.Providers.Manager
             var season = item as Season;
             var extension = MimeTypes.ToExtension(mimeType);
 
+            if (string.IsNullOrWhiteSpace(extension))
+            {
+                throw new ArgumentException(string.Format("Unable to determine image file extension from mime type {0}", mimeType));
+            }
+
             if (type == ImageType.Thumb && saveLocally)
             {
                 if (season != null && season.IndexNumber.HasValue)