diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs index 8bf0703be..2c059c860 100644 --- a/MediaBrowser.Model/Net/MimeTypes.cs +++ b/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; } diff --git a/MediaBrowser.Providers/Manager/ImageSaver.cs b/MediaBrowser.Providers/Manager/ImageSaver.cs index 7e1fa8984..767c034ee 100644 --- a/MediaBrowser.Providers/Manager/ImageSaver.cs +++ b/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)