diff options
author | Chocobozzz <me@florianbigard.com> | 2022-11-07 10:25:24 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-11-07 10:25:24 +0100 |
commit | a32bf8cd20212b903d3fa478e629f051eb77fecc (patch) | |
tree | 2a0372477ae2d76c31fc749054e78f1d067807d3 /server/controllers/api | |
parent | 11ae7e2917ddf6e3c8e53d0855fd786163112d59 (diff) | |
download | PeerTube-a32bf8cd20212b903d3fa478e629f051eb77fecc.tar.gz PeerTube-a32bf8cd20212b903d3fa478e629f051eb77fecc.tar.zst PeerTube-a32bf8cd20212b903d3fa478e629f051eb77fecc.zip |
Fix running again transcoding on a video only file
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/videos/transcoding.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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) { | |||
32 | 32 | ||
33 | const body: VideoTranscodingCreate = req.body | 33 | const body: VideoTranscodingCreate = req.body |
34 | 34 | ||
35 | const { resolution: maxResolution, audioStream } = await video.probeMaxQualityFile() | 35 | const { resolution: maxResolution, hasAudio } = await video.probeMaxQualityFile() |
36 | |||
36 | const resolutions = await Hooks.wrapObject( | 37 | const resolutions = await Hooks.wrapObject( |
37 | computeResolutionsToTranscode({ input: maxResolution, type: 'vod', includeInput: true, strictLower: false }), | 38 | computeResolutionsToTranscode({ input: maxResolution, type: 'vod', includeInput: true, strictLower: false, hasAudio }), |
38 | 'filter:transcoding.manual.resolutions-to-transcode.result', | 39 | 'filter:transcoding.manual.resolutions-to-transcode.result', |
39 | body | 40 | body |
40 | ) | 41 | ) |
@@ -46,7 +47,6 @@ async function createTranscoding (req: express.Request, res: express.Response) { | |||
46 | video.state = VideoState.TO_TRANSCODE | 47 | video.state = VideoState.TO_TRANSCODE |
47 | await video.save() | 48 | await video.save() |
48 | 49 | ||
49 | const hasAudio = !!audioStream | ||
50 | const childrenResolutions = resolutions.filter(r => r !== maxResolution) | 50 | const childrenResolutions = resolutions.filter(r => r !== maxResolution) |
51 | 51 | ||
52 | const children = await Bluebird.mapSeries(childrenResolutions, resolution => { | 52 | const children = await Bluebird.mapSeries(childrenResolutions, resolution => { |