aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers/video-transcoding.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/job-queue/handlers/video-transcoding.ts')
-rw-r--r--server/lib/job-queue/handlers/video-transcoding.ts12
1 files changed, 4 insertions, 8 deletions
diff --git a/server/lib/job-queue/handlers/video-transcoding.ts b/server/lib/job-queue/handlers/video-transcoding.ts
index d9dad795e..581ec283e 100644
--- a/server/lib/job-queue/handlers/video-transcoding.ts
+++ b/server/lib/job-queue/handlers/video-transcoding.ts
@@ -85,10 +85,9 @@ async function publishVideoIfNeeded (video: VideoModel, payload?: VideoTranscodi
85 return { videoDatabase, videoPublished } 85 return { videoDatabase, videoPublished }
86 }) 86 })
87 87
88 // don't notify prior to scheduled video update 88 if (videoPublished) {
89 if (videoPublished && !videoDatabase.ScheduleVideoUpdate) {
90 Notifier.Instance.notifyOnNewVideo(videoDatabase) 89 Notifier.Instance.notifyOnNewVideo(videoDatabase)
91 Notifier.Instance.notifyOnPendingVideoPublished(videoDatabase) 90 Notifier.Instance.notifyOnVideoPublishedAfterTranscoding(videoDatabase)
92 } 91 }
93 92
94 await createHlsJobIfEnabled(payload) 93 await createHlsJobIfEnabled(payload)
@@ -146,11 +145,8 @@ async function onVideoFileOptimizerSuccess (videoArg: VideoModel, payload: Video
146 return { videoDatabase, videoPublished } 145 return { videoDatabase, videoPublished }
147 }) 146 })
148 147
149 // don't notify prior to scheduled video update 148 if (payload.isNewVideo) Notifier.Instance.notifyOnNewVideo(videoDatabase)
150 if (!videoDatabase.ScheduleVideoUpdate) { 149 if (videoPublished) Notifier.Instance.notifyOnVideoPublishedAfterTranscoding(videoDatabase)
151 if (payload.isNewVideo) Notifier.Instance.notifyOnNewVideo(videoDatabase)
152 if (videoPublished) Notifier.Instance.notifyOnPendingVideoPublished(videoDatabase)
153 }
154 150
155 await createHlsJobIfEnabled(Object.assign({}, payload, { resolution: videoDatabase.getOriginalFile().resolution })) 151 await createHlsJobIfEnabled(Object.assign({}, payload, { resolution: videoDatabase.getOriginalFile().resolution }))
156} 152}