aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/TrickplayController.cs
diff options
context:
space:
mode:
authorTim Eisele <Shadowghost@users.noreply.github.com>2024-09-07 19:23:48 +0200
committerGitHub <noreply@github.com>2024-09-07 11:23:48 -0600
commitc56dbc1c4410e1b0ec31ca901809b6f627bbb6ed (patch)
tree56df7024be555125eae955da94dd5dda248b8f59 /Jellyfin.Api/Controllers/TrickplayController.cs
parent675a8a9ec91da47e37ace6161ba5a5a0e20a7839 (diff)
Enhance Trickplay (#11883)
Diffstat (limited to 'Jellyfin.Api/Controllers/TrickplayController.cs')
-rw-r--r--Jellyfin.Api/Controllers/TrickplayController.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/TrickplayController.cs b/Jellyfin.Api/Controllers/TrickplayController.cs
index 60d49af9e..c1ff0f340 100644
--- a/Jellyfin.Api/Controllers/TrickplayController.cs
+++ b/Jellyfin.Api/Controllers/TrickplayController.cs
@@ -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);