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:
parent
45d22afca6
commit
b45ed3c05a
4 changed files with 23 additions and 11 deletions
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue