From aff48c14ffbfb565986534ef1b345841b002efc9 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Wed, 6 Sep 2023 01:20:59 +0200 Subject: [PATCH] fix oops --- src/hooks/useFfmpegOperations.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hooks/useFfmpegOperations.js b/src/hooks/useFfmpegOperations.js index a1514e8..0ab667c 100644 --- a/src/hooks/useFfmpegOperations.js +++ b/src/hooks/useFfmpegOperations.js @@ -440,6 +440,8 @@ function useFfmpegOperations({ filePath, treatInputFileModifiedTimeAsStart, trea const autoConcatCutSegments = useCallback(async ({ customOutDir, outFormat, segmentPaths, ffmpegExperimental, onProgress, preserveMovData, movFastStart, autoDeleteMergedSegments, chapterNames, preserveMetadataOnMerge, appendFfmpegCommandLog, mergedOutFilePath }) => { const outDir = getOutDir(customOutDir, filePath); + if (await shouldSkipExistingFile(mergedOutFilePath)) return; + const chapters = await createChaptersFromSegments({ segmentPaths, chapterNames }); const metadataFromPath = segmentPaths[0]; @@ -447,7 +449,7 @@ function useFfmpegOperations({ filePath, treatInputFileModifiedTimeAsStart, trea const { streams } = await readFileMeta(metadataFromPath); await concatFiles({ paths: segmentPaths, outDir, outPath: mergedOutFilePath, metadataFromPath, outFormat, includeAllStreams: true, streams, ffmpegExperimental, onProgress, preserveMovData, movFastStart, chapters, preserveMetadataOnMerge, appendFfmpegCommandLog }); if (autoDeleteMergedSegments) await tryDeleteFiles(segmentPaths); - }, [concatFiles, filePath]); + }, [concatFiles, filePath, shouldSkipExistingFile]); const html5ify = useCallback(async ({ customOutDir, filePath: filePathArg, speed, hasAudio, hasVideo, onProgress }) => { const outPath = getHtml5ifiedPath(customOutDir, filePathArg, speed);