diff options
| author | thedreaddpirate <137357145+thedreaddpirate@users.noreply.github.com> | 2026-09-27 16:30:54 -0400 |
|---|---|---|
| committer | Cody Robibero <cody@robibe.ro> | 2026-09-27 16:30:54 -0400 |
| commit | 4902205dd4c9d4db882db20606a7596cf5334e68 (patch) | |
| tree | 7dac1ba3955811f3b11fc8434681fd7abb46eb9b /Jellyfin.Server.Implementations | |
| parent | a62c35315c1e95f95d4ec41848cab19898c33347 (diff) | |
Backport pull request #18161 from jellyfin/release-12.z
Check media directory write permission before generating trickplays
Original-merge: a1a0441daa854edd9b37b06892bc3dac4c261508
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'Jellyfin.Server.Implementations')
| -rw-r--r-- | Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs | 9 |
1 files changed, 9 insertions, 0 deletions
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, |
