diff options
Diffstat (limited to 'server/lib/job-queue/handlers/video-studio-edition.ts')
-rw-r--r-- | server/lib/job-queue/handlers/video-studio-edition.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/server/lib/job-queue/handlers/video-studio-edition.ts b/server/lib/job-queue/handlers/video-studio-edition.ts index 078243538..23f9a34cc 100644 --- a/server/lib/job-queue/handlers/video-studio-edition.ts +++ b/server/lib/job-queue/handlers/video-studio-edition.ts | |||
@@ -8,7 +8,7 @@ import { federateVideoIfNeeded } from '@server/lib/activitypub/videos' | |||
8 | import { generateWebTorrentVideoFilename } from '@server/lib/paths' | 8 | import { generateWebTorrentVideoFilename } from '@server/lib/paths' |
9 | import { VideoTranscodingProfilesManager } from '@server/lib/transcoding/default-transcoding-profiles' | 9 | import { VideoTranscodingProfilesManager } from '@server/lib/transcoding/default-transcoding-profiles' |
10 | import { isAbleToUploadVideo } from '@server/lib/user' | 10 | import { isAbleToUploadVideo } from '@server/lib/user' |
11 | import { addOptimizeOrMergeAudioJob } from '@server/lib/video' | 11 | import { buildOptimizeOrMergeAudioJob } from '@server/lib/video' |
12 | import { removeHLSPlaylist, removeWebTorrentFile } from '@server/lib/video-file' | 12 | import { removeHLSPlaylist, removeWebTorrentFile } from '@server/lib/video-file' |
13 | import { VideoPathManager } from '@server/lib/video-path-manager' | 13 | import { VideoPathManager } from '@server/lib/video-path-manager' |
14 | import { approximateIntroOutroAdditionalSize } from '@server/lib/video-studio' | 14 | import { approximateIntroOutroAdditionalSize } from '@server/lib/video-studio' |
@@ -36,6 +36,7 @@ import { | |||
36 | VideoStudioTaskWatermarkPayload | 36 | VideoStudioTaskWatermarkPayload |
37 | } from '@shared/models' | 37 | } from '@shared/models' |
38 | import { logger, loggerTagsFactory } from '../../../helpers/logger' | 38 | import { logger, loggerTagsFactory } from '../../../helpers/logger' |
39 | import { JobQueue } from '../job-queue' | ||
39 | 40 | ||
40 | const lTagsBase = loggerTagsFactory('video-edition') | 41 | const lTagsBase = loggerTagsFactory('video-edition') |
41 | 42 | ||
@@ -43,7 +44,7 @@ async function processVideoStudioEdition (job: Job) { | |||
43 | const payload = job.data as VideoStudioEditionPayload | 44 | const payload = job.data as VideoStudioEditionPayload |
44 | const lTags = lTagsBase(payload.videoUUID) | 45 | const lTags = lTagsBase(payload.videoUUID) |
45 | 46 | ||
46 | logger.info('Process video studio edition of %s in job %d.', payload.videoUUID, job.id, lTags) | 47 | logger.info('Process video studio edition of %s in job %s.', payload.videoUUID, job.id, lTags) |
47 | 48 | ||
48 | const video = await VideoModel.loadFull(payload.videoUUID) | 49 | const video = await VideoModel.loadFull(payload.videoUUID) |
49 | 50 | ||
@@ -100,7 +101,10 @@ async function processVideoStudioEdition (job: Job) { | |||
100 | await federateVideoIfNeeded(video, false, undefined) | 101 | await federateVideoIfNeeded(video, false, undefined) |
101 | 102 | ||
102 | const user = await UserModel.loadByVideoId(video.id) | 103 | const user = await UserModel.loadByVideoId(video.id) |
103 | await addOptimizeOrMergeAudioJob({ video, videoFile: newFile, user, isNewVideo: false }) | 104 | |
105 | await JobQueue.Instance.createJob( | ||
106 | await buildOptimizeOrMergeAudioJob({ video, videoFile: newFile, user, isNewVideo: false }) | ||
107 | ) | ||
104 | } | 108 | } |
105 | 109 | ||
106 | // --------------------------------------------------------------------------- | 110 | // --------------------------------------------------------------------------- |