From ef8e5cad585cfb3a4356ca15fe8485f9fbed0519 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 7 Oct 2024 08:19:34 +0200 Subject: [PATCH] More robust live ending on invalid thumbnails --- .../lib/job-queue/handlers/video-live-ending.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/server/core/lib/job-queue/handlers/video-live-ending.ts b/server/core/lib/job-queue/handlers/video-live-ending.ts index dba971649..ad862799f 100644 --- a/server/core/lib/job-queue/handlers/video-live-ending.ts +++ b/server/core/lib/job-queue/handlers/video-live-ending.ts @@ -178,7 +178,14 @@ async function saveReplayToExternalVideo (options: { inputFileMutexReleaser() } - await copyOrRegenerateThumbnails({ liveVideo, replayVideo }) + try { + await copyOrRegenerateThumbnails({ liveVideo, replayVideo }) + } catch (err) { + logger.error( + `Cannot copy/regenerate thumbnails of ended live ${liveVideo.uuid} to external video ${replayVideo.uuid}`, + lTags(liveVideo.uuid, replayVideo.uuid) + ) + } await createStoryboardJob(replayVideo) await createTranscriptionTaskIfNeeded(replayVideo) @@ -280,7 +287,11 @@ async function replaceLiveByReplay (options: { } // Regenerate the thumbnail & preview? - await regenerateMiniaturesIfNeeded(videoWithFiles, undefined) + try { + await regenerateMiniaturesIfNeeded(videoWithFiles, undefined) + } catch (err) { + logger.error(`Cannot regenerate thumbnails of ended live ${videoWithFiles.uuid}`, lTags(liveVideo.uuid)) + } // We consider this is a new video await moveToNextState({ video: videoWithFiles, isNewVideo: true })