mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Do not run transcription/transcoding on lives
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user