return videoImportUpdated
})
- Notifier.Instance.notifyOnNewVideo(videoImportUpdated.Video)
+ Notifier.Instance.notifyOnFinishedVideoImport(videoImportUpdated, true)
+
+ if (videoImportUpdated.Video.VideoBlacklist) {
+ Notifier.Instance.notifyOnVideoAutoBlacklist(videoImportUpdated.Video)
+ } else {
+ Notifier.Instance.notifyOnNewVideo(videoImportUpdated.Video)
+ }
// Create transcoding jobs?
if (videoImportUpdated.Video.state === VideoState.TO_TRANSCODE) {
isNewVideo: true
}
- await JobQueue.Instance.createJob({ type: 'video-file', payload: dataInput })
+ await JobQueue.Instance.createJob({ type: 'video-transcoding', payload: dataInput })
}
} catch (err) {
videoImport.state = VideoImportState.FAILED
await videoImport.save()
+ Notifier.Instance.notifyOnFinishedVideoImport(videoImport, false)
+
throw err
}
}