]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Don't notify when transcoding ends on manual run
authorChocobozzz <me@florianbigard.com>
Wed, 1 Dec 2021 11:33:46 +0000 (12:33 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 1 Dec 2021 11:33:46 +0000 (12:33 +0100)
server/lib/video-state.ts

index bf6dd4bc88a4ae4f54371efba392d3d9deab8ab6..e420991cd34f44a5b945f986f1b4c42b68abc589 100644 (file)
@@ -106,7 +106,9 @@ async function moveToPublishedState (video: MVideoFullLight, isNewVideo: boolean
   // Live videos are always federated, so it's not a new video
   await federateVideoIfNeeded(video, isNewVideo, transaction)
 
-  if (isNewVideo) Notifier.Instance.notifyOnNewVideoIfNeeded(video)
+  if (!isNewVideo) return
+
+  Notifier.Instance.notifyOnNewVideoIfNeeded(video)
 
   if (previousState === VideoState.TO_TRANSCODE) {
     Notifier.Instance.notifyOnVideoPublishedAfterTranscoding(video)