From 54815ea9c7625ef1cae022a0bceabd6ce06100f4 Mon Sep 17 00:00:00 2001 From: Josh Vincent Date: Fri, 6 Jun 2025 13:25:20 -0600 Subject: [PATCH] Add a second to bulk chapters so its valid This will enable users to go in and fix the chapter timing later but still save easily with the bulk import. --- client/pages/audiobook/_id/chapters.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/pages/audiobook/_id/chapters.vue b/client/pages/audiobook/_id/chapters.vue index 10840f25..26902240 100644 --- a/client/pages/audiobook/_id/chapters.vue +++ b/client/pages/audiobook/_id/chapters.vue @@ -922,14 +922,13 @@ export default { const { before, after, startingNumber } = this.detectedPattern const lastChapter = this.newChapters[this.newChapters.length - 1] - const baseStart = lastChapter ? lastChapter.end : 0 - const defaultDuration = 300 // 5 minutes per chapter + const baseStart = lastChapter ? lastChapter.start + 1 : 0 // Add multiple chapters with the detected pattern for (let i = 0; i < count; i++) { const chapterNumber = startingNumber + i - const newStart = baseStart + i * defaultDuration - const newEnd = Math.min(newStart + defaultDuration, this.mediaDuration) + const newStart = baseStart + i + const newEnd = Math.min(newStart + i + i, this.mediaDuration) const newChapter = { id: this.newChapters.length,