mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Prevent HLS transcoding after webtorrent transcoding
This commit is contained in:
parent
3e8c3fcdb0
commit
0f11ec8dd3
6 changed files with 42 additions and 9 deletions
|
@ -10,7 +10,7 @@ import { pick } from '@shared/core-utils'
|
|||
import {
|
||||
HLSTranscodingPayload,
|
||||
MergeAudioTranscodingPayload,
|
||||
NewResolutionTranscodingPayload,
|
||||
NewWebTorrentResolutionTranscodingPayload,
|
||||
OptimizeTranscodingPayload,
|
||||
VideoResolution,
|
||||
VideoTranscodingPayload
|
||||
|
@ -110,7 +110,7 @@ async function handleHLSJob (job: Job, payload: HLSTranscodingPayload, video: MV
|
|||
|
||||
async function handleNewWebTorrentResolutionJob (
|
||||
job: Job,
|
||||
payload: NewResolutionTranscodingPayload,
|
||||
payload: NewWebTorrentResolutionTranscodingPayload,
|
||||
video: MVideoFullLight,
|
||||
user: MUserId
|
||||
) {
|
||||
|
@ -217,9 +217,12 @@ async function onVideoFirstWebTorrentTranscoding (
|
|||
async function onNewWebTorrentFileResolution (
|
||||
video: MVideo,
|
||||
user: MUserId,
|
||||
payload: NewResolutionTranscodingPayload | MergeAudioTranscodingPayload
|
||||
payload: NewWebTorrentResolutionTranscodingPayload | MergeAudioTranscodingPayload
|
||||
) {
|
||||
await createHlsJobIfEnabled(user, { hasAudio: true, copyCodecs: true, isMaxQuality: false, ...payload })
|
||||
if (payload.createHLSIfNeeded) {
|
||||
await createHlsJobIfEnabled(user, { hasAudio: true, copyCodecs: true, isMaxQuality: false, ...payload })
|
||||
}
|
||||
|
||||
await VideoJobInfoModel.decrease(video.uuid, 'pendingTranscode')
|
||||
|
||||
await retryTransactionWrapper(moveToNextState, video, payload.isNewVideo)
|
||||
|
@ -282,6 +285,7 @@ async function createLowerResolutionsJobs (options: {
|
|||
resolution,
|
||||
isPortraitMode,
|
||||
hasAudio,
|
||||
createHLSIfNeeded: true,
|
||||
isNewVideo
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue