mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-05 00:06:35 +01:00
fix chapter average calculation to avoid division by zero error.
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -108,7 +108,7 @@ public class ChapterManager : IChapterManager
|
||||
sum += chapters[i].StartPositionTicks - chapters[i - 1].StartPositionTicks;
|
||||
}
|
||||
|
||||
return sum / chapters.Count;
|
||||
return sum / (chapters.Count - 1);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user