From bd816dd2a87137f7f623db971f428d8e7abbbec7 Mon Sep 17 00:00:00 2001 From: thematuu <75018580+thematuu@users.noreply.github.com> Date: Sat, 21 Feb 2026 12:51:43 +0200 Subject: [PATCH] Simplify --- src/renderer/src/ffmpeg.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/ffmpeg.ts b/src/renderer/src/ffmpeg.ts index 61565514..80bd9794 100644 --- a/src/renderer/src/ffmpeg.ts +++ b/src/renderer/src/ffmpeg.ts @@ -239,7 +239,7 @@ export async function createChaptersFromOriginalFiles({ paths, createChapterForF let offset = 0; for (const path of paths) { const meta = await readFileFfprobeMeta(path); - const duration = (await getDuration(path)) ?? (meta.format?.duration != null ? parseFloat(meta.format.duration) : 0); + const duration = (await getDuration(path)) ?? 0; const chapters = meta.chapters ?? []; if (chapters.length > 0) { for (const ch of chapters) {