diff --git a/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts b/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts index 321f7b09f..3c2b46d16 100644 --- a/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts @@ -167,7 +167,7 @@ export class VideoActionsDropdownComponent implements OnChanges { } canVideoBeDuplicated () { - return this.video.canBeDuplicatedBy(this.user) + return !this.video.isLive && this.video.canBeDuplicatedBy(this.user) } isVideoAccountMutable () { diff --git a/server/middlewares/validators/redundancy.ts b/server/middlewares/validators/redundancy.ts index 6d2dd39c9..c379aebe4 100644 --- a/server/middlewares/validators/redundancy.ts +++ b/server/middlewares/validators/redundancy.ts @@ -130,8 +130,12 @@ const addVideoRedundancyValidator = [ if (res.locals.onlyVideo.remote === false) { return res.status(HttpStatusCode.BAD_REQUEST_400) - .json({ error: 'Cannot create a redundancy on a local video' }) - .end() + .json({ error: 'Cannot create a redundancy on a local video' }) + } + + if (res.locals.onlyVideo.isLive) { + return res.status(HttpStatusCode.BAD_REQUEST_400) + .json({ error: 'Cannot create a redundancy of a live video' }) } const alreadyExists = await VideoRedundancyModel.isLocalByVideoUUIDExists(res.locals.onlyVideo.uuid)