mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-12-27 01:46:24 +00:00
Apply review changes
This commit is contained in:
parent
1ba0b88703
commit
630de12e5e
|
@ -208,15 +208,8 @@ namespace MediaBrowser.Providers.Manager
|
|||
}
|
||||
|
||||
// Deduce content type from file extension
|
||||
var fileExtension = Path.GetExtension(url)?.ToLowerInvariant();
|
||||
contentType = fileExtension switch
|
||||
{
|
||||
".jpg" or ".jpeg" => MediaTypeNames.Image.Jpeg,
|
||||
".png" => MediaTypeNames.Image.Png,
|
||||
".gif" => MediaTypeNames.Image.Gif,
|
||||
".webp" => "image/webp",
|
||||
_ => null
|
||||
};
|
||||
var fileExtension = MimeTypes.GetMimeType(new Uri(url).GetLeftPart(UriPartial.Path));
|
||||
contentType = fileExtension;
|
||||
|
||||
if (string.IsNullOrEmpty(contentType))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue