aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts2
-rw-r--r--server/middlewares/validators/redundancy.ts8
2 files changed, 7 insertions, 3 deletions
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 {
167 } 167 }
168 168
169 canVideoBeDuplicated () { 169 canVideoBeDuplicated () {
170 return this.video.canBeDuplicatedBy(this.user) 170 return !this.video.isLive && this.video.canBeDuplicatedBy(this.user)
171 } 171 }
172 172
173 isVideoAccountMutable () { 173 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 = [
130 130
131 if (res.locals.onlyVideo.remote === false) { 131 if (res.locals.onlyVideo.remote === false) {
132 return res.status(HttpStatusCode.BAD_REQUEST_400) 132 return res.status(HttpStatusCode.BAD_REQUEST_400)
133 .json({ error: 'Cannot create a redundancy on a local video' }) 133 .json({ error: 'Cannot create a redundancy on a local video' })
134 .end() 134 }
135
136 if (res.locals.onlyVideo.isLive) {
137 return res.status(HttpStatusCode.BAD_REQUEST_400)
138 .json({ error: 'Cannot create a redundancy of a live video' })
135 } 139 }
136 140
137 const alreadyExists = await VideoRedundancyModel.isLocalByVideoUUIDExists(res.locals.onlyVideo.uuid) 141 const alreadyExists = await VideoRedundancyModel.isLocalByVideoUUIDExists(res.locals.onlyVideo.uuid)