diff options
| author | Jellyfrog <Jellyfrog@users.noreply.github.com> | 2026-09-27 16:30:46 -0400 |
|---|---|---|
| committer | Cody Robibero <cody@robibe.ro> | 2026-09-27 16:30:46 -0400 |
| commit | 017f9ba4652f5d5e5b747661324e56b1454e7f3e (patch) | |
| tree | 5a86514bbcab52d0b20075a9d8cc0317573e7eb3 /Emby.Server.Implementations/Chapters/ChapterManager.cs | |
| parent | 7693488122ee612faa15a02891ae85f792d36374 (diff) | |
Backport pull request #18107 from jellyfin/release-12.z
Log chapter image extraction once per video
Original-merge: 19338de7ba61edf9810c249fad6bddc582237247
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'Emby.Server.Implementations/Chapters/ChapterManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Chapters/ChapterManager.cs | 9 |
1 files changed, 8 insertions, 1 deletions
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); |
