aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers/video-transcoding.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/job-queue/handlers/video-transcoding.ts')
-rw-r--r--server/lib/job-queue/handlers/video-transcoding.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/server/lib/job-queue/handlers/video-transcoding.ts b/server/lib/job-queue/handlers/video-transcoding.ts
index 02902b0b8..5540b791d 100644
--- a/server/lib/job-queue/handlers/video-transcoding.ts
+++ b/server/lib/job-queue/handlers/video-transcoding.ts
@@ -10,7 +10,7 @@ import { pick } from '@shared/core-utils'
10import { 10import {
11 HLSTranscodingPayload, 11 HLSTranscodingPayload,
12 MergeAudioTranscodingPayload, 12 MergeAudioTranscodingPayload,
13 NewResolutionTranscodingPayload, 13 NewWebTorrentResolutionTranscodingPayload,
14 OptimizeTranscodingPayload, 14 OptimizeTranscodingPayload,
15 VideoResolution, 15 VideoResolution,
16 VideoTranscodingPayload 16 VideoTranscodingPayload
@@ -110,7 +110,7 @@ async function handleHLSJob (job: Job, payload: HLSTranscodingPayload, video: MV
110 110
111async function handleNewWebTorrentResolutionJob ( 111async function handleNewWebTorrentResolutionJob (
112 job: Job, 112 job: Job,
113 payload: NewResolutionTranscodingPayload, 113 payload: NewWebTorrentResolutionTranscodingPayload,
114 video: MVideoFullLight, 114 video: MVideoFullLight,
115 user: MUserId 115 user: MUserId
116) { 116) {
@@ -217,9 +217,12 @@ async function onVideoFirstWebTorrentTranscoding (
217async function onNewWebTorrentFileResolution ( 217async function onNewWebTorrentFileResolution (
218 video: MVideo, 218 video: MVideo,
219 user: MUserId, 219 user: MUserId,
220 payload: NewResolutionTranscodingPayload | MergeAudioTranscodingPayload 220 payload: NewWebTorrentResolutionTranscodingPayload | MergeAudioTranscodingPayload
221) { 221) {
222 await createHlsJobIfEnabled(user, { hasAudio: true, copyCodecs: true, isMaxQuality: false, ...payload }) 222 if (payload.createHLSIfNeeded) {
223 await createHlsJobIfEnabled(user, { hasAudio: true, copyCodecs: true, isMaxQuality: false, ...payload })
224 }
225
223 await VideoJobInfoModel.decrease(video.uuid, 'pendingTranscode') 226 await VideoJobInfoModel.decrease(video.uuid, 'pendingTranscode')
224 227
225 await retryTransactionWrapper(moveToNextState, video, payload.isNewVideo) 228 await retryTransactionWrapper(moveToNextState, video, payload.isNewVideo)
@@ -282,6 +285,7 @@ async function createLowerResolutionsJobs (options: {
282 resolution, 285 resolution,
283 isPortraitMode, 286 isPortraitMode,
284 hasAudio, 287 hasAudio,
288 createHLSIfNeeded: true,
285 isNewVideo 289 isNewVideo
286 } 290 }
287 291