From f6f48301a9ad392759d714d2cff13f1564942a50 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 8 Mar 2022 09:42:22 +0100 Subject: More robust transcoding checker --- server/middlewares/validators/videos/video-transcoding.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/middlewares') diff --git a/server/middlewares/validators/videos/video-transcoding.ts b/server/middlewares/validators/videos/video-transcoding.ts index 34f231d45..da6638f4d 100644 --- a/server/middlewares/validators/videos/video-transcoding.ts +++ b/server/middlewares/validators/videos/video-transcoding.ts @@ -37,7 +37,7 @@ const createTranscodingValidator = [ // Prefer using job info table instead of video state because before 4.0 failed transcoded video were stuck in "TO_TRANSCODE" state const info = await VideoJobInfoModel.load(video.id) - if (info && info.pendingTranscode !== 0) { + if (info && info.pendingTranscode > 0) { return res.fail({ status: HttpStatusCode.CONFLICT_409, message: 'This video is already being transcoded' -- cgit v1.2.3