From 017f9ba4652f5d5e5b747661324e56b1454e7f3e Mon Sep 17 00:00:00 2001 From: Jellyfrog Date: Sun, 27 Sep 2026 16:30:46 -0400 Subject: Backport pull request #18107 from jellyfin/release-12.z Log chapter image extraction once per video Original-merge: 19338de7ba61edf9810c249fad6bddc582237247 Merged-by: crobibero Backported-by: Cody Robibero --- Emby.Server.Implementations/Chapters/ChapterManager.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Emby.Server.Implementations/Chapters/ChapterManager.cs') diff --git a/Emby.Server.Implementations/Chapters/ChapterManager.cs b/Emby.Server.Implementations/Chapters/ChapterManager.cs index 69cbe533c6..2938170d1b 100644 --- a/Emby.Server.Implementations/Chapters/ChapterManager.cs +++ b/Emby.Server.Implementations/Chapters/ChapterManager.cs @@ -137,6 +137,7 @@ public class ChapterManager : IChapterManager var success = true; var changesMade = false; + var extractedCount = 0; var runtimeTicks = video.RunTimeTicks ?? 0; @@ -178,7 +179,7 @@ public class ChapterManager : IChapterManager Protocol = video.PathProtocol ?? MediaProtocol.File, }; - _logger.LogInformation("Extracting chapter image for {Name} at {Path}", video.Name, inputPath); + _logger.LogDebug("Extracting chapter image for {Name} at {Time}", video.Name, time); var tempFile = await _encoder.ExtractVideoImage(inputPath, container, mediaSource, video.GetDefaultVideoStream(), video.Video3DFormat, time, cancellationToken).ConfigureAwait(false); File.Copy(tempFile, path, true); @@ -194,6 +195,7 @@ public class ChapterManager : IChapterManager chapter.ImagePath = path; chapter.ImageDateModified = _fileSystem.GetLastWriteTimeUtc(path); changesMade = true; + extractedCount++; } catch (Exception ex) { @@ -222,6 +224,11 @@ public class ChapterManager : IChapterManager } } + if (extractedCount > 0) + { + _logger.LogInformation("Extracted {Count} chapter images for {Name} at {Path}", extractedCount, video.Name, video.Path); + } + if (saveChapters && changesMade) { SaveChapters(video, chapters); -- cgit v1.2.3