]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos/index.ts
Fix images size limit
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos / index.ts
index 79ca4699ff536499b7cb667979ecf52b2a09bc64..ca800a9a8bece715915a307b93d0b2845176479f 100644 (file)
@@ -342,10 +342,12 @@ async function updateVideo (req: express.Request, res: express.Response) {
           updateAt: videoInfoToUpdate.scheduleUpdate.updateAt,
           privacy: videoInfoToUpdate.scheduleUpdate.privacy || null
         }, { transaction: t })
+      } else if (videoInfoToUpdate.scheduleUpdate === null) {
+        await ScheduleVideoUpdateModel.deleteByVideoId(videoInstanceUpdated.id, t)
       }
 
       const isNewVideo = wasPrivateVideo && videoInstanceUpdated.privacy !== VideoPrivacy.PRIVATE
-      await federateVideoIfNeeded(videoInstanceUpdated, isNewVideo)
+      await federateVideoIfNeeded(videoInstanceUpdated, isNewVideo, t)
     })
 
     logger.info('Video with name %s and uuid %s updated.', videoInstance.name, videoInstance.uuid)