1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Do not run transcription/transcoding on lives

This commit is contained in:
Chocobozzz 2024-07-01 11:15:09 +02:00
parent 45d22afca6
commit b45ed3c05a
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 23 additions and 11 deletions

View file

@ -74,6 +74,13 @@ export const generateVideoCaptionValidator = [
})
}
if (video.isLive) {
return res.fail({
status: HttpStatusCode.BAD_REQUEST_400,
message: 'Cannot run transcription job on a live'
})
}
// Check if the user who did the request is able to update the video
const user = res.locals.oauth.token.User
if (!checkUserCanManageVideo(user, video, UserRight.UPDATE_ANY_VIDEO, res)) return

View file

@ -31,6 +31,13 @@ const createTranscodingValidator = [
})
}
if (video.isLive) {
return res.fail({
status: HttpStatusCode.BAD_REQUEST_400,
message: 'Cannot run transcoding job on a live'
})
}
if (CONFIG.TRANSCODING.ENABLED !== true) {
return res.fail({
status: HttpStatusCode.BAD_REQUEST_400,