From a32bf8cd20212b903d3fa478e629f051eb77fecc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 7 Nov 2022 10:25:24 +0100 Subject: Fix running again transcoding on a video only file --- server/controllers/api/videos/transcoding.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/controllers/api') diff --git a/server/controllers/api/videos/transcoding.ts b/server/controllers/api/videos/transcoding.ts index 9aca761c1..a39e47dfe 100644 --- a/server/controllers/api/videos/transcoding.ts +++ b/server/controllers/api/videos/transcoding.ts @@ -32,9 +32,10 @@ async function createTranscoding (req: express.Request, res: express.Response) { const body: VideoTranscodingCreate = req.body - const { resolution: maxResolution, audioStream } = await video.probeMaxQualityFile() + const { resolution: maxResolution, hasAudio } = await video.probeMaxQualityFile() + const resolutions = await Hooks.wrapObject( - computeResolutionsToTranscode({ input: maxResolution, type: 'vod', includeInput: true, strictLower: false }), + computeResolutionsToTranscode({ input: maxResolution, type: 'vod', includeInput: true, strictLower: false, hasAudio }), 'filter:transcoding.manual.resolutions-to-transcode.result', body ) @@ -46,7 +47,6 @@ async function createTranscoding (req: express.Request, res: express.Response) { video.state = VideoState.TO_TRANSCODE await video.save() - const hasAudio = !!audioStream const childrenResolutions = resolutions.filter(r => r !== maxResolution) const children = await Bluebird.mapSeries(childrenResolutions, resolution => { -- cgit v1.2.3