From a687879e94fa5d3ecdd76bec3d94d0e1698ee913 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 5 May 2023 13:41:48 +0200 Subject: Reload the video after waiting for the files lock --- .../transcoding/shared/job-builders/transcoding-job-queue-builder.ts | 3 +++ .../transcoding/shared/job-builders/transcoding-runner-job-builder.ts | 3 +++ 2 files changed, 6 insertions(+) (limited to 'server/lib/transcoding/shared') diff --git a/server/lib/transcoding/shared/job-builders/transcoding-job-queue-builder.ts b/server/lib/transcoding/shared/job-builders/transcoding-job-queue-builder.ts index 29ee2ca61..fa2ac70bf 100644 --- a/server/lib/transcoding/shared/job-builders/transcoding-job-queue-builder.ts +++ b/server/lib/transcoding/shared/job-builders/transcoding-job-queue-builder.ts @@ -40,6 +40,9 @@ export class TranscodingJobQueueBuilder extends AbstractJobBuilder { : await VideoPathManager.Instance.lockFiles(video.uuid) try { + await video.reload() + await videoFile.reload() + await VideoPathManager.Instance.makeAvailableVideoFile(videoFile.withVideoOrPlaylist(video), async videoFilePath => { const probe = await ffprobePromise(videoFilePath) diff --git a/server/lib/transcoding/shared/job-builders/transcoding-runner-job-builder.ts b/server/lib/transcoding/shared/job-builders/transcoding-runner-job-builder.ts index 90b035402..4b8bc2f3d 100644 --- a/server/lib/transcoding/shared/job-builders/transcoding-runner-job-builder.ts +++ b/server/lib/transcoding/shared/job-builders/transcoding-runner-job-builder.ts @@ -36,6 +36,9 @@ export class TranscodingRunnerJobBuilder extends AbstractJobBuilder { : await VideoPathManager.Instance.lockFiles(video.uuid) try { + await video.reload() + await videoFile.reload() + await VideoPathManager.Instance.makeAvailableVideoFile(videoFile.withVideoOrPlaylist(video), async videoFilePath => { const probe = await ffprobePromise(videoFilePath) -- cgit v1.2.3