mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-08 08:48:48 +01:00
Jellyfin.Drawing minor improvements
Reduce duplicate/dead code
This commit is contained in:
@@ -204,16 +204,10 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||
? Path.GetExtension(attachmentStream.FileName)
|
||||
: MimeTypes.ToExtension(attachmentStream.MimeType);
|
||||
|
||||
if (string.IsNullOrEmpty(extension))
|
||||
{
|
||||
extension = ".jpg";
|
||||
}
|
||||
|
||||
ImageFormat format = extension switch
|
||||
{
|
||||
".bmp" => ImageFormat.Bmp,
|
||||
".gif" => ImageFormat.Gif,
|
||||
".jpg" => ImageFormat.Jpg,
|
||||
".png" => ImageFormat.Png,
|
||||
".webp" => ImageFormat.Webp,
|
||||
_ => ImageFormat.Jpg
|
||||
|
||||
Reference in New Issue
Block a user