diff options
| author | Bond_009 <bond.009@outlook.com> | 2022-01-04 10:40:16 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2022-01-04 10:40:16 +0100 |
| commit | dc222b75c55645fce521c572acebb16b278169a5 (patch) | |
| tree | 5585cf4f2e47d2fcd9a62304f28937fec943cadb /Jellyfin.Api/Controllers/DlnaServerController.cs | |
| parent | c6a1dcf420dfbb4bef80b1267fe26035e67f9a6d (diff) | |
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() |
