diff options
author | Chocobozzz <me@florianbigard.com> | 2022-03-08 09:42:22 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-03-08 09:42:22 +0100 |
commit | f6f48301a9ad392759d714d2cff13f1564942a50 (patch) | |
tree | 581654f7ed23b3912484cd5091864830b903127b /server/middlewares/validators | |
parent | c47c3bcb0a9265d2a414ec96075052f8619d3f21 (diff) | |
download | PeerTube-f6f48301a9ad392759d714d2cff13f1564942a50.tar.gz PeerTube-f6f48301a9ad392759d714d2cff13f1564942a50.tar.zst PeerTube-f6f48301a9ad392759d714d2cff13f1564942a50.zip |
More robust transcoding checker
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r-- | server/middlewares/validators/videos/video-transcoding.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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 = [ | |||
37 | 37 | ||
38 | // Prefer using job info table instead of video state because before 4.0 failed transcoded video were stuck in "TO_TRANSCODE" state | 38 | // Prefer using job info table instead of video state because before 4.0 failed transcoded video were stuck in "TO_TRANSCODE" state |
39 | const info = await VideoJobInfoModel.load(video.id) | 39 | const info = await VideoJobInfoModel.load(video.id) |
40 | if (info && info.pendingTranscode !== 0) { | 40 | if (info && info.pendingTranscode > 0) { |
41 | return res.fail({ | 41 | return res.fail({ |
42 | status: HttpStatusCode.CONFLICT_409, | 42 | status: HttpStatusCode.CONFLICT_409, |
43 | message: 'This video is already being transcoded' | 43 | message: 'This video is already being transcoded' |