Fix dummy chapter handling for videos with a single chapter.

This commit is contained in:
ExpctING
2026-04-25 03:30:55 +08:00
parent 461662f1ff
commit 857e730168
3 changed files with 6 additions and 9 deletions

View File

@@ -128,7 +128,7 @@ public class ChapterManager : IChapterManager
var averageChapterDuration = GetAverageDurationBetweenChapters(chapters);
var threshold = TimeSpan.FromSeconds(1).Ticks;
if (averageChapterDuration < threshold)
if (chapters.Count >= 2 && averageChapterDuration < threshold)
{
_logger.LogInformation("Skipping chapter image extraction for {Video} as the average chapter duration {AverageDuration} was lower than the minimum threshold {Threshold}", video.Name, averageChapterDuration, threshold);
extractImages = false;