Răsfoiți Sursa

Specify image file return for GetItemImage2

crobibero 4 ani în urmă
părinte
comite
a698dab66f

+ 1 - 1
Jellyfin.Api/Controllers/DashboardController.cs

@@ -214,7 +214,7 @@ namespace Jellyfin.Api.Controllers
             {
             {
                 return Redirect("index.html?start=wizard#!/wizardstart.html");
                 return Redirect("index.html?start=wizard#!/wizardstart.html");
             }
             }
-            
+
             return PhysicalFile(_resourceFileManager.GetResourcePath(basePath, path), MimeTypes.GetMimeType(path));
             return PhysicalFile(_resourceFileManager.GetResourcePath(basePath, path), MimeTypes.GetMimeType(path));
         }
         }
 
 

+ 1 - 0
Jellyfin.Api/Controllers/ImageController.cs

@@ -431,6 +431,7 @@ namespace Jellyfin.Api.Controllers
         [HttpHead("Items/{itemId}/Images/{imageType}/{imageIndex}/{tag}/{format}/{maxWidth}/{maxHeight}/{percentPlayed}/{unplayedCount}", Name = "HeadItemImage2")]
         [HttpHead("Items/{itemId}/Images/{imageType}/{imageIndex}/{tag}/{format}/{maxWidth}/{maxHeight}/{percentPlayed}/{unplayedCount}", Name = "HeadItemImage2")]
         [ProducesResponseType(StatusCodes.Status200OK)]
         [ProducesResponseType(StatusCodes.Status200OK)]
         [ProducesResponseType(StatusCodes.Status404NotFound)]
         [ProducesResponseType(StatusCodes.Status404NotFound)]
+        [ProducesImageFile]
         public async Task<ActionResult> GetItemImage2(
         public async Task<ActionResult> GetItemImage2(
             [FromRoute] Guid itemId,
             [FromRoute] Guid itemId,
             [FromRoute] ImageType imageType,
             [FromRoute] ImageType imageType,