mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 01:34:45 +03:00
Enhance Trickplay (#11883)
This commit is contained in:
@@ -80,7 +80,7 @@ public class TrickplayController : BaseJellyfinApiController
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||
[ProducesImageFile]
|
||||
public ActionResult GetTrickplayTileImage(
|
||||
public async Task<ActionResult> GetTrickplayTileImageAsync(
|
||||
[FromRoute, Required] Guid itemId,
|
||||
[FromRoute, Required] int width,
|
||||
[FromRoute, Required] int index,
|
||||
@@ -92,8 +92,9 @@ public class TrickplayController : BaseJellyfinApiController
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var path = _trickplayManager.GetTrickplayTilePath(item, width, index);
|
||||
if (System.IO.File.Exists(path))
|
||||
var saveWithMedia = _libraryManager.GetLibraryOptions(item).SaveTrickplayWithMedia;
|
||||
var path = await _trickplayManager.GetTrickplayTilePathAsync(item, width, index, saveWithMedia).ConfigureAwait(false);
|
||||
if (!string.IsNullOrEmpty(path) && System.IO.File.Exists(path))
|
||||
{
|
||||
Response.Headers.ContentDisposition = "attachment";
|
||||
return PhysicalFile(path, MediaTypeNames.Image.Jpeg);
|
||||
|
||||
Reference in New Issue
Block a user