diff options
Diffstat (limited to 'server/lib/job-queue/handlers')
-rw-r--r-- | server/lib/job-queue/handlers/video-transcoding.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/lib/job-queue/handlers/video-transcoding.ts b/server/lib/job-queue/handlers/video-transcoding.ts index 1b34ced14..d3fb7778b 100644 --- a/server/lib/job-queue/handlers/video-transcoding.ts +++ b/server/lib/job-queue/handlers/video-transcoding.ts | |||
@@ -26,6 +26,7 @@ import { | |||
26 | optimizeOriginalVideofile, | 26 | optimizeOriginalVideofile, |
27 | transcodeNewWebTorrentResolution | 27 | transcodeNewWebTorrentResolution |
28 | } from '../../transcoding/transcoding' | 28 | } from '../../transcoding/transcoding' |
29 | import { Hooks } from '@server/lib/plugins/hooks' | ||
29 | 30 | ||
30 | type HandlerFunction = (job: Job, payload: VideoTranscodingPayload, video: MVideoFullLight, user: MUser) => Promise<void> | 31 | type HandlerFunction = (job: Job, payload: VideoTranscodingPayload, video: MVideoFullLight, user: MUser) => Promise<void> |
31 | 32 | ||
@@ -269,7 +270,12 @@ async function createLowerResolutionsJobs (options: { | |||
269 | const { video, user, videoFileResolution, isPortraitMode, isNewVideo, hasAudio, type } = options | 270 | const { video, user, videoFileResolution, isPortraitMode, isNewVideo, hasAudio, type } = options |
270 | 271 | ||
271 | // Create transcoding jobs if there are enabled resolutions | 272 | // Create transcoding jobs if there are enabled resolutions |
272 | const resolutionsEnabled = computeLowerResolutionsToTranscode(videoFileResolution, 'vod') | 273 | const resolutionsEnabled = await Hooks.wrapObject( |
274 | computeLowerResolutionsToTranscode(videoFileResolution, 'vod'), | ||
275 | 'filter:transcoding.auto.lower-resolutions-to-transcode.result', | ||
276 | options | ||
277 | ) | ||
278 | |||
273 | const resolutionCreated: string[] = [] | 279 | const resolutionCreated: string[] = [] |
274 | 280 | ||
275 | for (const resolution of resolutionsEnabled) { | 281 | for (const resolution of resolutionsEnabled) { |