diff options
Diffstat (limited to 'server/lib/job-queue/handlers')
-rw-r--r-- | server/lib/job-queue/handlers/video-import.ts | 4 | ||||
-rw-r--r-- | server/lib/job-queue/handlers/video-transcoding.ts | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/job-queue/handlers/video-import.ts b/server/lib/job-queue/handlers/video-import.ts index 50e159245..13b741180 100644 --- a/server/lib/job-queue/handlers/video-import.ts +++ b/server/lib/job-queue/handlers/video-import.ts | |||
@@ -199,10 +199,10 @@ async function processFile (downloader: () => Promise<string>, videoImport: Vide | |||
199 | 199 | ||
200 | Notifier.Instance.notifyOnFinishedVideoImport(videoImportUpdated, true) | 200 | Notifier.Instance.notifyOnFinishedVideoImport(videoImportUpdated, true) |
201 | 201 | ||
202 | if (videoImportUpdated.Video.VideoBlacklist) { | 202 | if (videoImportUpdated.Video.isBlacklisted()) { |
203 | Notifier.Instance.notifyOnVideoAutoBlacklist(videoImportUpdated.Video) | 203 | Notifier.Instance.notifyOnVideoAutoBlacklist(videoImportUpdated.Video) |
204 | } else { | 204 | } else { |
205 | Notifier.Instance.notifyOnNewVideo(videoImportUpdated.Video) | 205 | Notifier.Instance.notifyOnNewVideoIfNeeded(videoImportUpdated.Video) |
206 | } | 206 | } |
207 | 207 | ||
208 | // Create transcoding jobs? | 208 | // Create transcoding jobs? |
diff --git a/server/lib/job-queue/handlers/video-transcoding.ts b/server/lib/job-queue/handlers/video-transcoding.ts index e9b84ecd6..981daf9a1 100644 --- a/server/lib/job-queue/handlers/video-transcoding.ts +++ b/server/lib/job-queue/handlers/video-transcoding.ts | |||
@@ -112,7 +112,7 @@ async function publishNewResolutionIfNeeded (video: VideoModel, payload?: NewRes | |||
112 | }) | 112 | }) |
113 | 113 | ||
114 | if (videoPublished) { | 114 | if (videoPublished) { |
115 | Notifier.Instance.notifyOnNewVideo(videoDatabase) | 115 | Notifier.Instance.notifyOnNewVideoIfNeeded(videoDatabase) |
116 | Notifier.Instance.notifyOnVideoPublishedAfterTranscoding(videoDatabase) | 116 | Notifier.Instance.notifyOnVideoPublishedAfterTranscoding(videoDatabase) |
117 | } | 117 | } |
118 | 118 | ||
@@ -172,7 +172,7 @@ async function onVideoFileOptimizerSuccess (videoArg: VideoModel, payload: Optim | |||
172 | return { videoDatabase, videoPublished } | 172 | return { videoDatabase, videoPublished } |
173 | }) | 173 | }) |
174 | 174 | ||
175 | if (payload.isNewVideo) Notifier.Instance.notifyOnNewVideo(videoDatabase) | 175 | if (payload.isNewVideo) Notifier.Instance.notifyOnNewVideoIfNeeded(videoDatabase) |
176 | if (videoPublished) Notifier.Instance.notifyOnVideoPublishedAfterTranscoding(videoDatabase) | 176 | if (videoPublished) Notifier.Instance.notifyOnVideoPublishedAfterTranscoding(videoDatabase) |
177 | 177 | ||
178 | const hlsPayload = Object.assign({}, payload, { resolution: videoDatabase.getOriginalFile().resolution }) | 178 | const hlsPayload = Object.assign({}, payload, { resolution: videoDatabase.getOriginalFile().resolution }) |