The Free Software Media System - Server Backend & API
Backport pull request #18107 from jellyfin/release-12.z
Jellyfrog017f9ba4652f
diff --git a/Emby.Server.Implementations/Chapters/ChapterManager.cs b/Emby.Server.Implementations/Chapters/ChapterManager.csindex 69cbe533c6..2938170d1b 100644--- a/Emby.Server.Implementations/Chapters/ChapterManager.cs+++ b/Emby.Server.Implementations/Chapters/ChapterManager.cs@@ -137,6 +137,7 @@ public class ChapterManager : IChapterManagervar success = true;var changesMade = false;+ var extractedCount = 0;var runtimeTicks = video.RunTimeTicks ?? 0;@@ -178,7 +179,7 @@ public class ChapterManager : IChapterManagerProtocol = 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 : IChapterManagerchapter.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);