aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorLucas Declercq <lucas.declercq@ineat-conseil.fr>2018-10-06 19:17:21 +0200
committerLucas Declercq <lucas.declercq@ineat-conseil.fr>2018-10-06 19:17:39 +0200
commit156c50af3085468a47b8ae73fe8cfcae46b42398 (patch)
treef316355ebea2550c201a880cfc9f9b724bf0f7fd /server/helpers
parent35d50b7dd26b3cf646b8845784927bb1ef18dfb3 (diff)
downloadPeerTube-156c50af3085468a47b8ae73fe8cfcae46b42398.tar.gz
PeerTube-156c50af3085468a47b8ae73fe8cfcae46b42398.tar.zst
PeerTube-156c50af3085468a47b8ae73fe8cfcae46b42398.zip
Add downloadingEnabled property to video model
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/activitypub.ts1
-rw-r--r--server/helpers/audit-logger.ts3
-rw-r--r--server/helpers/custom-validators/activitypub/videos.ts1
3 files changed, 4 insertions, 1 deletions
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts
index 1304c7559..7f903e486 100644
--- a/server/helpers/activitypub.ts
+++ b/server/helpers/activitypub.ts
@@ -28,6 +28,7 @@ function activityPubContextify <T> (data: T) {
28 size: 'schema:Number', 28 size: 'schema:Number',
29 fps: 'schema:Number', 29 fps: 'schema:Number',
30 commentsEnabled: 'schema:Boolean', 30 commentsEnabled: 'schema:Boolean',
31 downloadingEnabled: 'schema:Boolean',
31 waitTranscoding: 'schema:Boolean', 32 waitTranscoding: 'schema:Boolean',
32 expires: 'schema:expires', 33 expires: 'schema:expires',
33 support: 'schema:Text', 34 support: 'schema:Text',
diff --git a/server/helpers/audit-logger.ts b/server/helpers/audit-logger.ts
index 00311fce1..d2c9aee01 100644
--- a/server/helpers/audit-logger.ts
+++ b/server/helpers/audit-logger.ts
@@ -117,7 +117,8 @@ const videoKeysToKeep = [
117 'channel-uuid', 117 'channel-uuid',
118 'channel-name', 118 'channel-name',
119 'support', 119 'support',
120 'commentsEnabled' 120 'commentsEnabled',
121 'downloadingEnabled'
121] 122]
122class VideoAuditView extends EntityAuditView { 123class VideoAuditView extends EntityAuditView {
123 constructor (private video: VideoDetails) { 124 constructor (private video: VideoDetails) {
diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.ts
index f88d26561..34e4cdff9 100644
--- a/server/helpers/custom-validators/activitypub/videos.ts
+++ b/server/helpers/custom-validators/activitypub/videos.ts
@@ -67,6 +67,7 @@ function sanitizeAndCheckVideoTorrentObject (video: any) {
67 isVideoViewsValid(video.views) && 67 isVideoViewsValid(video.views) &&
68 isBooleanValid(video.sensitive) && 68 isBooleanValid(video.sensitive) &&
69 isBooleanValid(video.commentsEnabled) && 69 isBooleanValid(video.commentsEnabled) &&
70 isBooleanValid(video.downloadingEnabled) &&
70 isDateValid(video.published) && 71 isDateValid(video.published) &&
71 isDateValid(video.updated) && 72 isDateValid(video.updated) &&
72 (!video.content || isRemoteVideoContentValid(video.mediaType, video.content)) && 73 (!video.content || isRemoteVideoContentValid(video.mediaType, video.content)) &&