mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-12-27 09:56:33 +00:00
Use .net constants
This commit is contained in:
parent
96cf13060d
commit
1ba0b88703
|
@ -203,7 +203,7 @@ namespace MediaBrowser.Providers.Manager
|
|||
// First, check for imagecache special case
|
||||
if (url.Contains("/imagecache/", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
contentType = "image/png";
|
||||
contentType = MediaTypeNames.Image.Png;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -211,9 +211,9 @@ namespace MediaBrowser.Providers.Manager
|
|||
var fileExtension = Path.GetExtension(url)?.ToLowerInvariant();
|
||||
contentType = fileExtension switch
|
||||
{
|
||||
".jpg" or ".jpeg" => "image/jpeg",
|
||||
".png" => "image/png",
|
||||
".gif" => "image/gif",
|
||||
".jpg" or ".jpeg" => MediaTypeNames.Image.Jpeg,
|
||||
".png" => MediaTypeNames.Image.Png,
|
||||
".gif" => MediaTypeNames.Image.Gif,
|
||||
".webp" => "image/webp",
|
||||
_ => null
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue