diff options
| author | Cody Robibero <cody@robibe.ro> | 2022-01-08 04:45:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-08 04:45:58 -0700 |
| commit | 9b1965b48ace52d325aeedf31932a860ffadea3f (patch) | |
| tree | 846e5d2ca77b7a8a764e9afaa5be610885126cc2 /Jellyfin.Api/Controllers/DlnaServerController.cs | |
| parent | ce61dff4aae0875cfc359c9d8dc1a8a15f9409cd (diff) | |
| parent | dc222b75c55645fce521c572acebb16b278169a5 (diff) | |
Merge pull request #7101 from Bond-009/imagejpg
Remove incorrect mime type image/jpg
Diffstat (limited to 'Jellyfin.Api/Controllers/DlnaServerController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/DlnaServerController.cs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Jellyfin.Api/Controllers/DlnaServerController.cs b/Jellyfin.Api/Controllers/DlnaServerController.cs index 4e8c01577..b1c576c33 100644 --- a/Jellyfin.Api/Controllers/DlnaServerController.cs +++ b/Jellyfin.Api/Controllers/DlnaServerController.cs @@ -9,6 +9,7 @@ using Emby.Dlna.Main; using Jellyfin.Api.Attributes; using Jellyfin.Api.Constants; using MediaBrowser.Controller.Dlna; +using MediaBrowser.Model.Net; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; @@ -337,11 +338,7 @@ namespace Jellyfin.Api.Controllers return NotFound(); } - var contentType = "image/" + Path.GetExtension(fileName) - .TrimStart('.') - .ToLowerInvariant(); - - return File(icon.Stream, contentType); + return File(icon.Stream, MimeTypes.GetMimeType(fileName)); } private string GetAbsoluteUri() |
