]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/videos/video-transcoding.ts
More robust transcoding checker
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / videos / video-transcoding.ts
index 34f231d454886bdf4c2e7354932e2bb0eae4b6c4..da6638f4d03e7e317d9b1b5c94f09560f364ed38 100644 (file)
@@ -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'