aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS.md1
-rw-r--r--Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs9
2 files changed, 10 insertions, 0 deletions
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 63ba6bf52d..0b36dfa529 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -244,6 +244,7 @@
- [Oggeb1](https://github.com/Oggeb1)
- [scr4bble](https://github.com/scr4bble)
- [Mateus Bandeira](https://github.com/mateusbandeiraa)
+ - [TheDreadPirate](https://github.com/thedreaddpirate)
# Emby Contributors
diff --git a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs
index 58b9f7f822..40a153c8ed 100644
--- a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs
+++ b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs
@@ -11,6 +11,7 @@ using AsyncKeyedLock;
using J2N.Collections.Generic.Extensions;
using Jellyfin.Database.Implementations;
using Jellyfin.Database.Implementations.Entities;
+using Jellyfin.Extensions;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Drawing;
@@ -478,6 +479,14 @@ public partial class TrickplayManager : ITrickplayManager
var mediaStream = mediaSource.VideoStream;
var container = mediaSource.Container;
+ // Checks for write permission before generating images
+ if (saveWithMedia)
+ {
+ _logger.LogDebug("Verifying write permission in media directory {OutputDir}", outputDir);
+ Directory.CreateDirectory(outputDir.FullName);
+ FileHelper.CreateEmpty(Path.Combine(outputDir.FullName, ".jellyfin-trickplay"));
+ }
+
_logger.LogInformation("Creating trickplay files at {Width} width, for {Path} [ID: {ItemId}]", actualWidth, mediaPath, video.Id);
imgTempDir = await _mediaEncoder.ExtractVideoImagesOnIntervalAccelerated(
mediaPath,