aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/job-queue/handlers/video-file.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/server/lib/job-queue/handlers/video-file.ts b/server/lib/job-queue/handlers/video-file.ts
index 593e43cc5..217d666b6 100644
--- a/server/lib/job-queue/handlers/video-file.ts
+++ b/server/lib/job-queue/handlers/video-file.ts
@@ -91,7 +91,8 @@ async function onVideoFileTranscoderOrImportSuccess (video: VideoModel) {
91 return { videoDatabase, videoPublished } 91 return { videoDatabase, videoPublished }
92 }) 92 })
93 93
94 if (videoPublished) { 94 // don't notify prior to scheduled video update
95 if (videoPublished && !videoDatabase.ScheduleVideoUpdate) {
95 Notifier.Instance.notifyOnNewVideo(videoDatabase) 96 Notifier.Instance.notifyOnNewVideo(videoDatabase)
96 Notifier.Instance.notifyOnPendingVideoPublished(videoDatabase) 97 Notifier.Instance.notifyOnPendingVideoPublished(videoDatabase)
97 } 98 }
@@ -149,8 +150,11 @@ async function onVideoFileOptimizerSuccess (videoArg: VideoModel, isNewVideo: bo
149 return { videoDatabase, videoPublished } 150 return { videoDatabase, videoPublished }
150 }) 151 })
151 152
152 if (isNewVideo) Notifier.Instance.notifyOnNewVideo(videoDatabase) 153 // don't notify prior to scheduled video update
153 if (videoPublished) Notifier.Instance.notifyOnPendingVideoPublished(videoDatabase) 154 if (!videoDatabase.ScheduleVideoUpdate) {
155 if (isNewVideo) Notifier.Instance.notifyOnNewVideo(videoDatabase)
156 if (videoPublished) Notifier.Instance.notifyOnPendingVideoPublished(videoDatabase)
157 }
154} 158}
155 159
156// --------------------------------------------------------------------------- 160// ---------------------------------------------------------------------------