]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/job-queue/handlers/video-transcoding.ts
Suffix external auth username on conflict
[github/Chocobozzz/PeerTube.git] / server / lib / job-queue / handlers / video-transcoding.ts
index 1b34ced14db38a8ac49eacfe27676c07bbbaa45b..d3fb7778b76487e214e216fa2445644260ebfd50 100644 (file)
@@ -26,6 +26,7 @@ import {
   optimizeOriginalVideofile,
   transcodeNewWebTorrentResolution
 } from '../../transcoding/transcoding'
+import { Hooks } from '@server/lib/plugins/hooks'
 
 type HandlerFunction = (job: Job, payload: VideoTranscodingPayload, video: MVideoFullLight, user: MUser) => Promise<void>
 
@@ -269,7 +270,12 @@ async function createLowerResolutionsJobs (options: {
   const { video, user, videoFileResolution, isPortraitMode, isNewVideo, hasAudio, type } = options
 
   // Create transcoding jobs if there are enabled resolutions
-  const resolutionsEnabled = computeLowerResolutionsToTranscode(videoFileResolution, 'vod')
+  const resolutionsEnabled = await Hooks.wrapObject(
+    computeLowerResolutionsToTranscode(videoFileResolution, 'vod'),
+    'filter:transcoding.auto.lower-resolutions-to-transcode.result',
+    options
+  )
+
   const resolutionCreated: string[] = []
 
   for (const resolution of resolutionsEnabled) {