1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Fix running again transcoding on a video only file

This commit is contained in:
Chocobozzz 2022-11-07 10:25:24 +01:00
parent 11ae7e2917
commit a32bf8cd20
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 29 additions and 17 deletions

View file

@ -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 => {