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

Server: propagate video update to other pods

This commit is contained in:
Chocobozzz 2016-12-30 11:27:42 +01:00
parent 7b1f49de22
commit 3d118fb501
5 changed files with 153 additions and 35 deletions

View file

@ -37,6 +37,17 @@ function isEachRemoteVideosValid (requests) {
isVideoRemoteIdValid(video.remoteId) &&
isVideoExtnameValid(video.extname)
) ||
(
isRequestTypeUpdateValid(request.type) &&
isVideoDateValid(video.createdAt) &&
isVideoDescriptionValid(video.description) &&
isVideoDurationValid(video.duration) &&
isVideoInfoHashValid(video.infoHash) &&
isVideoNameValid(video.name) &&
isVideoTagsValid(video.tags) &&
isVideoRemoteIdValid(video.remoteId) &&
isVideoExtnameValid(video.extname)
) ||
(
isRequestTypeRemoveValid(request.type) &&
isVideoNameValid(video.name) &&
@ -104,6 +115,10 @@ function isRequestTypeAddValid (value) {
return value === 'add'
}
function isRequestTypeUpdateValid (value) {
return value === 'update'
}
function isRequestTypeRemoveValid (value) {
return value === 'remove'
}