diff options
author | Lucas Declercq <lucas.declercq@ineat-conseil.fr> | 2018-10-08 14:45:22 +0200 |
---|---|---|
committer | Lucas Declercq <lucas.declercq@ineat-conseil.fr> | 2018-10-08 14:45:22 +0200 |
commit | 7f2cfe3a792856f7de6f1d13688aa3d06ec1bf70 (patch) | |
tree | 8042222877ed6dc983ff0e13ea3ec56aa1a4386a | |
parent | 4ffdcfc63b8c804a0aea20609544c859ab57318b (diff) | |
download | PeerTube-7f2cfe3a792856f7de6f1d13688aa3d06ec1bf70.tar.gz PeerTube-7f2cfe3a792856f7de6f1d13688aa3d06ec1bf70.tar.zst PeerTube-7f2cfe3a792856f7de6f1d13688aa3d06ec1bf70.zip |
Rename downloadingEnabled property to downloadEnabled
35 files changed, 64 insertions, 64 deletions
diff --git a/client/src/app/shared/video-import/video-import.service.ts b/client/src/app/shared/video-import/video-import.service.ts index 74c458645..2163eb905 100644 --- a/client/src/app/shared/video-import/video-import.service.ts +++ b/client/src/app/shared/video-import/video-import.service.ts | |||
@@ -81,7 +81,7 @@ export class VideoImportService { | |||
81 | nsfw: video.nsfw, | 81 | nsfw: video.nsfw, |
82 | waitTranscoding: video.waitTranscoding, | 82 | waitTranscoding: video.waitTranscoding, |
83 | commentsEnabled: video.commentsEnabled, | 83 | commentsEnabled: video.commentsEnabled, |
84 | downloadingEnabled: video.downloadingEnabled, | 84 | downloadEnabled: video.downloadEnabled, |
85 | thumbnailfile: video.thumbnailfile, | 85 | thumbnailfile: video.thumbnailfile, |
86 | previewfile: video.previewfile, | 86 | previewfile: video.previewfile, |
87 | scheduleUpdate | 87 | scheduleUpdate |
diff --git a/client/src/app/shared/video/video-details.model.ts b/client/src/app/shared/video/video-details.model.ts index ad85641dc..5ff3926c4 100644 --- a/client/src/app/shared/video/video-details.model.ts +++ b/client/src/app/shared/video/video-details.model.ts | |||
@@ -12,7 +12,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { | |||
12 | files: VideoFile[] | 12 | files: VideoFile[] |
13 | account: Account | 13 | account: Account |
14 | commentsEnabled: boolean | 14 | commentsEnabled: boolean |
15 | downloadingEnabled: boolean | 15 | downloadEnabled: boolean |
16 | 16 | ||
17 | waitTranscoding: boolean | 17 | waitTranscoding: boolean |
18 | state: VideoConstant<VideoState> | 18 | state: VideoConstant<VideoState> |
@@ -30,7 +30,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { | |||
30 | this.tags = hash.tags | 30 | this.tags = hash.tags |
31 | this.support = hash.support | 31 | this.support = hash.support |
32 | this.commentsEnabled = hash.commentsEnabled | 32 | this.commentsEnabled = hash.commentsEnabled |
33 | this.downloadingEnabled = hash.downloadingEnabled | 33 | this.downloadEnabled = hash.downloadEnabled |
34 | 34 | ||
35 | this.buildLikeAndDislikePercents() | 35 | this.buildLikeAndDislikePercents() |
36 | } | 36 | } |
diff --git a/client/src/app/shared/video/video-edit.model.ts b/client/src/app/shared/video/video-edit.model.ts index 47703ff79..e385004e5 100644 --- a/client/src/app/shared/video/video-edit.model.ts +++ b/client/src/app/shared/video/video-edit.model.ts | |||
@@ -14,7 +14,7 @@ export class VideoEdit implements VideoUpdate { | |||
14 | tags: string[] | 14 | tags: string[] |
15 | nsfw: boolean | 15 | nsfw: boolean |
16 | commentsEnabled: boolean | 16 | commentsEnabled: boolean |
17 | downloadingEnabled: boolean | 17 | downloadEnabled: boolean |
18 | waitTranscoding: boolean | 18 | waitTranscoding: boolean |
19 | channelId: number | 19 | channelId: number |
20 | privacy: VideoPrivacy | 20 | privacy: VideoPrivacy |
@@ -27,7 +27,7 @@ export class VideoEdit implements VideoUpdate { | |||
27 | id?: number | 27 | id?: number |
28 | scheduleUpdate?: VideoScheduleUpdate | 28 | scheduleUpdate?: VideoScheduleUpdate |
29 | 29 | ||
30 | constructor (video?: Video & { tags: string[], commentsEnabled: boolean, downloadingEnabled: boolean, support: string, thumbnailUrl: string, previewUrl: string }) { | 30 | constructor (video?: Video & { tags: string[], commentsEnabled: boolean, downloadEnabled: boolean, support: string, thumbnailUrl: string, previewUrl: string }) { |
31 | if (video) { | 31 | if (video) { |
32 | this.id = video.id | 32 | this.id = video.id |
33 | this.uuid = video.uuid | 33 | this.uuid = video.uuid |
@@ -39,7 +39,7 @@ export class VideoEdit implements VideoUpdate { | |||
39 | this.tags = video.tags | 39 | this.tags = video.tags |
40 | this.nsfw = video.nsfw | 40 | this.nsfw = video.nsfw |
41 | this.commentsEnabled = video.commentsEnabled | 41 | this.commentsEnabled = video.commentsEnabled |
42 | this.downloadingEnabled = video.downloadingEnabled | 42 | this.downloadEnabled = video.downloadEnabled |
43 | this.waitTranscoding = video.waitTranscoding | 43 | this.waitTranscoding = video.waitTranscoding |
44 | this.channelId = video.channel.id | 44 | this.channelId = video.channel.id |
45 | this.privacy = video.privacy.id | 45 | this.privacy = video.privacy.id |
@@ -82,7 +82,7 @@ export class VideoEdit implements VideoUpdate { | |||
82 | tags: this.tags, | 82 | tags: this.tags, |
83 | nsfw: this.nsfw, | 83 | nsfw: this.nsfw, |
84 | commentsEnabled: this.commentsEnabled, | 84 | commentsEnabled: this.commentsEnabled, |
85 | downloadingEnabled: this.downloadingEnabled, | 85 | downloadEnabled: this.downloadEnabled, |
86 | waitTranscoding: this.waitTranscoding, | 86 | waitTranscoding: this.waitTranscoding, |
87 | channelId: this.channelId, | 87 | channelId: this.channelId, |
88 | privacy: this.privacy | 88 | privacy: this.privacy |
diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts index c0339dd39..c9d6da7a4 100644 --- a/client/src/app/shared/video/video.service.ts +++ b/client/src/app/shared/video/video.service.ts | |||
@@ -95,7 +95,7 @@ export class VideoService implements VideosProvider { | |||
95 | nsfw: video.nsfw, | 95 | nsfw: video.nsfw, |
96 | waitTranscoding: video.waitTranscoding, | 96 | waitTranscoding: video.waitTranscoding, |
97 | commentsEnabled: video.commentsEnabled, | 97 | commentsEnabled: video.commentsEnabled, |
98 | downloadingEnabled: video.downloadingEnabled, | 98 | downloadEnabled: video.downloadEnabled, |
99 | thumbnailfile: video.thumbnailfile, | 99 | thumbnailfile: video.thumbnailfile, |
100 | previewfile: video.previewfile, | 100 | previewfile: video.previewfile, |
101 | scheduleUpdate | 101 | scheduleUpdate |
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.html b/client/src/app/videos/+video-edit/shared/video-edit.component.html index 70d535055..8c74a1ca6 100644 --- a/client/src/app/videos/+video-edit/shared/video-edit.component.html +++ b/client/src/app/videos/+video-edit/shared/video-edit.component.html | |||
@@ -126,7 +126,7 @@ | |||
126 | ></my-peertube-checkbox> | 126 | ></my-peertube-checkbox> |
127 | 127 | ||
128 | <my-peertube-checkbox | 128 | <my-peertube-checkbox |
129 | inputName="downloadingEnabled" formControlName="downloadingEnabled" | 129 | inputName="downloadEnabled" formControlName="downloadEnabled" |
130 | i18n-labelText labelText="Disable downloading" | 130 | i18n-labelText labelText="Disable downloading" |
131 | ></my-peertube-checkbox> | 131 | ></my-peertube-checkbox> |
132 | 132 | ||
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.ts b/client/src/app/videos/+video-edit/shared/video-edit.component.ts index b09664376..1dae931e2 100644 --- a/client/src/app/videos/+video-edit/shared/video-edit.component.ts +++ b/client/src/app/videos/+video-edit/shared/video-edit.component.ts | |||
@@ -80,7 +80,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
80 | const defaultValues = { | 80 | const defaultValues = { |
81 | nsfw: 'false', | 81 | nsfw: 'false', |
82 | commentsEnabled: 'true', | 82 | commentsEnabled: 'true', |
83 | downloadingEnabled: 'true', | 83 | downloadEnabled: 'true', |
84 | waitTranscoding: 'true', | 84 | waitTranscoding: 'true', |
85 | tags: [] | 85 | tags: [] |
86 | } | 86 | } |
@@ -90,7 +90,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
90 | channelId: this.videoValidatorsService.VIDEO_CHANNEL, | 90 | channelId: this.videoValidatorsService.VIDEO_CHANNEL, |
91 | nsfw: null, | 91 | nsfw: null, |
92 | commentsEnabled: null, | 92 | commentsEnabled: null, |
93 | downloadingEnabled: null, | 93 | downloadEnabled: null, |
94 | waitTranscoding: null, | 94 | waitTranscoding: null, |
95 | category: this.videoValidatorsService.VIDEO_CATEGORY, | 95 | category: this.videoValidatorsService.VIDEO_CATEGORY, |
96 | licence: this.videoValidatorsService.VIDEO_LICENCE, | 96 | licence: this.videoValidatorsService.VIDEO_LICENCE, |
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts b/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts index 57cf0e395..0f6fd17a9 100644 --- a/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts +++ b/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts | |||
@@ -77,7 +77,7 @@ export class VideoImportTorrentComponent extends VideoSend implements OnInit, Ca | |||
77 | privacy: this.firstStepPrivacyId, | 77 | privacy: this.firstStepPrivacyId, |
78 | waitTranscoding: false, | 78 | waitTranscoding: false, |
79 | commentsEnabled: true, | 79 | commentsEnabled: true, |
80 | downloadingEnabled: true, | 80 | downloadEnabled: true, |
81 | channelId: this.firstStepChannelId | 81 | channelId: this.firstStepChannelId |
82 | } | 82 | } |
83 | 83 | ||
@@ -92,7 +92,7 @@ export class VideoImportTorrentComponent extends VideoSend implements OnInit, Ca | |||
92 | 92 | ||
93 | this.video = new VideoEdit(Object.assign(res.video, { | 93 | this.video = new VideoEdit(Object.assign(res.video, { |
94 | commentsEnabled: videoUpdate.commentsEnabled, | 94 | commentsEnabled: videoUpdate.commentsEnabled, |
95 | downloadingEnabled: videoUpdate.downloadingEnabled, | 95 | downloadEnabled: videoUpdate.downloadEnabled, |
96 | support: null, | 96 | support: null, |
97 | thumbnailUrl: null, | 97 | thumbnailUrl: null, |
98 | previewUrl: null | 98 | previewUrl: null |
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.ts b/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.ts index 11db4a7ef..fbc85c74f 100644 --- a/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.ts +++ b/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.ts | |||
@@ -69,7 +69,7 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, CanCom | |||
69 | privacy: this.firstStepPrivacyId, | 69 | privacy: this.firstStepPrivacyId, |
70 | waitTranscoding: false, | 70 | waitTranscoding: false, |
71 | commentsEnabled: true, | 71 | commentsEnabled: true, |
72 | downloadingEnabled: true, | 72 | downloadEnabled: true, |
73 | channelId: this.firstStepChannelId | 73 | channelId: this.firstStepChannelId |
74 | } | 74 | } |
75 | 75 | ||
@@ -84,7 +84,7 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, CanCom | |||
84 | 84 | ||
85 | this.video = new VideoEdit(Object.assign(res.video, { | 85 | this.video = new VideoEdit(Object.assign(res.video, { |
86 | commentsEnabled: videoUpdate.commentsEnabled, | 86 | commentsEnabled: videoUpdate.commentsEnabled, |
87 | downloadingEnabled: videoUpdate.downloadingEnabled, | 87 | downloadEnabled: videoUpdate.downloadEnabled, |
88 | support: null, | 88 | support: null, |
89 | thumbnailUrl: null, | 89 | thumbnailUrl: null, |
90 | previewUrl: null | 90 | previewUrl: null |
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts index 53f72f4e6..ac6c1786f 100644 --- a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts +++ b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts | |||
@@ -159,7 +159,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy | |||
159 | const nsfw = false | 159 | const nsfw = false |
160 | const waitTranscoding = true | 160 | const waitTranscoding = true |
161 | const commentsEnabled = true | 161 | const commentsEnabled = true |
162 | const downloadingEnabled = true | 162 | const downloadEnabled = true |
163 | const channelId = this.firstStepChannelId.toString() | 163 | const channelId = this.firstStepChannelId.toString() |
164 | 164 | ||
165 | const formData = new FormData() | 165 | const formData = new FormData() |
@@ -168,7 +168,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy | |||
168 | formData.append('privacy', VideoPrivacy.PRIVATE.toString()) | 168 | formData.append('privacy', VideoPrivacy.PRIVATE.toString()) |
169 | formData.append('nsfw', '' + nsfw) | 169 | formData.append('nsfw', '' + nsfw) |
170 | formData.append('commentsEnabled', '' + commentsEnabled) | 170 | formData.append('commentsEnabled', '' + commentsEnabled) |
171 | formData.append('downloadingEnabled', '' + downloadingEnabled) | 171 | formData.append('downloadEnabled', '' + downloadEnabled) |
172 | formData.append('waitTranscoding', '' + waitTranscoding) | 172 | formData.append('waitTranscoding', '' + waitTranscoding) |
173 | formData.append('channelId', '' + channelId) | 173 | formData.append('channelId', '' + channelId) |
174 | formData.append('videofile', videofile) | 174 | formData.append('videofile', videofile) |
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index 7cc831ab1..a7fd45695 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -314,7 +314,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
314 | } | 314 | } |
315 | 315 | ||
316 | isVideoDownloadable () { | 316 | isVideoDownloadable () { |
317 | return this.video && this.video.downloadingEnabled | 317 | return this.video && this.video.downloadEnabled |
318 | } | 318 | } |
319 | 319 | ||
320 | isVideoToImport () { | 320 | isVideoToImport () { |
diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts index a5cddba89..9e51e2000 100644 --- a/server/controllers/api/videos/import.ts +++ b/server/controllers/api/videos/import.ts | |||
@@ -171,7 +171,7 @@ function buildVideo (channelId: number, body: VideoImportCreate, importData: You | |||
171 | licence: body.licence || importData.licence, | 171 | licence: body.licence || importData.licence, |
172 | language: body.language || undefined, | 172 | language: body.language || undefined, |
173 | commentsEnabled: body.commentsEnabled || true, | 173 | commentsEnabled: body.commentsEnabled || true, |
174 | downloadingEnabled: body.downloadingEnabled || true, | 174 | downloadEnabled: body.downloadEnabled || true, |
175 | waitTranscoding: body.waitTranscoding || false, | 175 | waitTranscoding: body.waitTranscoding || false, |
176 | state: VideoState.TO_IMPORT, | 176 | state: VideoState.TO_IMPORT, |
177 | nsfw: body.nsfw || importData.nsfw || false, | 177 | nsfw: body.nsfw || importData.nsfw || false, |
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index 4b6d1b847..7d55f06b6 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -179,7 +179,7 @@ async function addVideo (req: express.Request, res: express.Response) { | |||
179 | licence: videoInfo.licence, | 179 | licence: videoInfo.licence, |
180 | language: videoInfo.language, | 180 | language: videoInfo.language, |
181 | commentsEnabled: videoInfo.commentsEnabled || false, | 181 | commentsEnabled: videoInfo.commentsEnabled || false, |
182 | downloadingEnabled: videoInfo.downloadingEnabled || true, | 182 | downloadEnabled: videoInfo.downloadEnabled || true, |
183 | waitTranscoding: videoInfo.waitTranscoding || false, | 183 | waitTranscoding: videoInfo.waitTranscoding || false, |
184 | state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED, | 184 | state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED, |
185 | nsfw: videoInfo.nsfw || false, | 185 | nsfw: videoInfo.nsfw || false, |
@@ -323,7 +323,7 @@ async function updateVideo (req: express.Request, res: express.Response) { | |||
323 | if (videoInfoToUpdate.support !== undefined) videoInstance.set('support', videoInfoToUpdate.support) | 323 | if (videoInfoToUpdate.support !== undefined) videoInstance.set('support', videoInfoToUpdate.support) |
324 | if (videoInfoToUpdate.description !== undefined) videoInstance.set('description', videoInfoToUpdate.description) | 324 | if (videoInfoToUpdate.description !== undefined) videoInstance.set('description', videoInfoToUpdate.description) |
325 | if (videoInfoToUpdate.commentsEnabled !== undefined) videoInstance.set('commentsEnabled', videoInfoToUpdate.commentsEnabled) | 325 | if (videoInfoToUpdate.commentsEnabled !== undefined) videoInstance.set('commentsEnabled', videoInfoToUpdate.commentsEnabled) |
326 | if (videoInfoToUpdate.downloadingEnabled !== undefined) videoInstance.set('downloadingEnabled', videoInfoToUpdate.downloadingEnabled) | 326 | if (videoInfoToUpdate.downloadEnabled !== undefined) videoInstance.set('downloadEnabled', videoInfoToUpdate.downloadEnabled) |
327 | if (videoInfoToUpdate.privacy !== undefined) { | 327 | if (videoInfoToUpdate.privacy !== undefined) { |
328 | const newPrivacy = parseInt(videoInfoToUpdate.privacy.toString(), 10) | 328 | const newPrivacy = parseInt(videoInfoToUpdate.privacy.toString(), 10) |
329 | videoInstance.set('privacy', newPrivacy) | 329 | videoInstance.set('privacy', newPrivacy) |
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index 7f903e486..2469b37b1 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts | |||
@@ -28,7 +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 | downloadEnabled: 'schema:Boolean', |
32 | waitTranscoding: 'schema:Boolean', | 32 | waitTranscoding: 'schema:Boolean', |
33 | expires: 'schema:expires', | 33 | expires: 'schema:expires', |
34 | support: 'schema:Text', | 34 | support: 'schema:Text', |
diff --git a/server/helpers/audit-logger.ts b/server/helpers/audit-logger.ts index d2c9aee01..a121f0b8a 100644 --- a/server/helpers/audit-logger.ts +++ b/server/helpers/audit-logger.ts | |||
@@ -118,7 +118,7 @@ const videoKeysToKeep = [ | |||
118 | 'channel-name', | 118 | 'channel-name', |
119 | 'support', | 119 | 'support', |
120 | 'commentsEnabled', | 120 | 'commentsEnabled', |
121 | 'downloadingEnabled' | 121 | 'downloadEnabled' |
122 | ] | 122 | ] |
123 | class VideoAuditView extends EntityAuditView { | 123 | class VideoAuditView extends EntityAuditView { |
124 | 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 59964f91a..5015c59dd 100644 --- a/server/helpers/custom-validators/activitypub/videos.ts +++ b/server/helpers/custom-validators/activitypub/videos.ts | |||
@@ -56,7 +56,7 @@ function sanitizeAndCheckVideoTorrentObject (video: any) { | |||
56 | // Default attributes | 56 | // Default attributes |
57 | if (!isVideoStateValid(video.state)) video.state = VideoState.PUBLISHED | 57 | if (!isVideoStateValid(video.state)) video.state = VideoState.PUBLISHED |
58 | if (!isBooleanValid(video.waitTranscoding)) video.waitTranscoding = false | 58 | if (!isBooleanValid(video.waitTranscoding)) video.waitTranscoding = false |
59 | if (!isBooleanValid(video.downloadingEnabled)) video.downloadingEnabled = true | 59 | if (!isBooleanValid(video.downloadEnabled)) video.downloadEnabled = true |
60 | 60 | ||
61 | return isActivityPubUrlValid(video.id) && | 61 | return isActivityPubUrlValid(video.id) && |
62 | isVideoNameValid(video.name) && | 62 | isVideoNameValid(video.name) && |
@@ -68,7 +68,7 @@ function sanitizeAndCheckVideoTorrentObject (video: any) { | |||
68 | isVideoViewsValid(video.views) && | 68 | isVideoViewsValid(video.views) && |
69 | isBooleanValid(video.sensitive) && | 69 | isBooleanValid(video.sensitive) && |
70 | isBooleanValid(video.commentsEnabled) && | 70 | isBooleanValid(video.commentsEnabled) && |
71 | isBooleanValid(video.downloadingEnabled) && | 71 | isBooleanValid(video.downloadEnabled) && |
72 | isDateValid(video.published) && | 72 | isDateValid(video.published) && |
73 | isDateValid(video.updated) && | 73 | isDateValid(video.updated) && |
74 | (!video.content || isRemoteVideoContentValid(video.mediaType, video.content)) && | 74 | (!video.content || isRemoteVideoContentValid(video.mediaType, video.content)) && |
diff --git a/server/initializers/migrations/0280-video-downloading-enabled.ts b/server/initializers/migrations/0280-video-downloading-enabled.ts index c0700108c..e79466447 100644 --- a/server/initializers/migrations/0280-video-downloading-enabled.ts +++ b/server/initializers/migrations/0280-video-downloading-enabled.ts | |||
@@ -11,10 +11,10 @@ async function up (utils: { | |||
11 | allowNull: false, | 11 | allowNull: false, |
12 | defaultValue: true | 12 | defaultValue: true |
13 | } as Migration.Boolean | 13 | } as Migration.Boolean |
14 | await utils.queryInterface.addColumn('video', 'downloadingEnabled', data) | 14 | await utils.queryInterface.addColumn('video', 'downloadEnabled', data) |
15 | 15 | ||
16 | data.defaultValue = null | 16 | data.defaultValue = null |
17 | return utils.queryInterface.changeColumn('video', 'downloadingEnabled', data) | 17 | return utils.queryInterface.changeColumn('video', 'downloadEnabled', data) |
18 | } | 18 | } |
19 | 19 | ||
20 | function down (options) { | 20 | function down (options) { |
diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts index dd02141ee..8521572a1 100644 --- a/server/lib/activitypub/videos.ts +++ b/server/lib/activitypub/videos.ts | |||
@@ -230,7 +230,7 @@ async function updateVideoFromAP (options: { | |||
230 | options.video.set('support', videoData.support) | 230 | options.video.set('support', videoData.support) |
231 | options.video.set('nsfw', videoData.nsfw) | 231 | options.video.set('nsfw', videoData.nsfw) |
232 | options.video.set('commentsEnabled', videoData.commentsEnabled) | 232 | options.video.set('commentsEnabled', videoData.commentsEnabled) |
233 | options.video.set('downloadingEnabled', videoData.downloadingEnabled) | 233 | options.video.set('downloadEnabled', videoData.downloadEnabled) |
234 | options.video.set('waitTranscoding', videoData.waitTranscoding) | 234 | options.video.set('waitTranscoding', videoData.waitTranscoding) |
235 | options.video.set('state', videoData.state) | 235 | options.video.set('state', videoData.state) |
236 | options.video.set('duration', videoData.duration) | 236 | options.video.set('duration', videoData.duration) |
@@ -442,7 +442,7 @@ async function videoActivityObjectToDBAttributes ( | |||
442 | support, | 442 | support, |
443 | nsfw: videoObject.sensitive, | 443 | nsfw: videoObject.sensitive, |
444 | commentsEnabled: videoObject.commentsEnabled, | 444 | commentsEnabled: videoObject.commentsEnabled, |
445 | downloadingEnabled: videoObject.downloadingEnabled, | 445 | downloadEnabled: videoObject.downloadEnabled, |
446 | waitTranscoding: videoObject.waitTranscoding, | 446 | waitTranscoding: videoObject.waitTranscoding, |
447 | state: videoObject.state, | 447 | state: videoObject.state, |
448 | channelId: videoChannel.id, | 448 | channelId: videoChannel.id, |
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts index bdba87496..27e8a7449 100644 --- a/server/middlewares/validators/videos/videos.ts +++ b/server/middlewares/validators/videos/videos.ts | |||
@@ -349,7 +349,7 @@ function getCommonVideoAttributes () { | |||
349 | .optional() | 349 | .optional() |
350 | .toBoolean() | 350 | .toBoolean() |
351 | .custom(isBooleanValid).withMessage('Should have comments enabled boolean'), | 351 | .custom(isBooleanValid).withMessage('Should have comments enabled boolean'), |
352 | body('downloadingEnabled') | 352 | body('downloadEnabled') |
353 | .optional() | 353 | .optional() |
354 | .toBoolean() | 354 | .toBoolean() |
355 | .custom(isBooleanValid).withMessage('Should have downloading enabled boolean'), | 355 | .custom(isBooleanValid).withMessage('Should have downloading enabled boolean'), |
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts index 0b0da4181..e7bff2ed7 100644 --- a/server/models/video/video-format-utils.ts +++ b/server/models/video/video-format-utils.ts | |||
@@ -128,7 +128,7 @@ function videoModelToFormattedDetailsJSON (video: VideoModel): VideoDetails { | |||
128 | account: video.VideoChannel.Account.toFormattedJSON(), | 128 | account: video.VideoChannel.Account.toFormattedJSON(), |
129 | tags, | 129 | tags, |
130 | commentsEnabled: video.commentsEnabled, | 130 | commentsEnabled: video.commentsEnabled, |
131 | downloadingEnabled: video.downloadingEnabled, | 131 | downloadEnabled: video.downloadEnabled, |
132 | waitTranscoding: video.waitTranscoding, | 132 | waitTranscoding: video.waitTranscoding, |
133 | state: { | 133 | state: { |
134 | id: video.state, | 134 | id: video.state, |
@@ -260,7 +260,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject { | |||
260 | waitTranscoding: video.waitTranscoding, | 260 | waitTranscoding: video.waitTranscoding, |
261 | state: video.state, | 261 | state: video.state, |
262 | commentsEnabled: video.commentsEnabled, | 262 | commentsEnabled: video.commentsEnabled, |
263 | downloadingEnabled: video.downloadingEnabled, | 263 | downloadEnabled: video.downloadEnabled, |
264 | published: video.publishedAt.toISOString(), | 264 | published: video.publishedAt.toISOString(), |
265 | updated: video.updatedAt.toISOString(), | 265 | updated: video.updatedAt.toISOString(), |
266 | mediaType: 'text/markdown', | 266 | mediaType: 'text/markdown', |
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index a2fe53fb9..a9baaf1da 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -600,7 +600,7 @@ export class VideoModel extends Model<VideoModel> { | |||
600 | 600 | ||
601 | @AllowNull(false) | 601 | @AllowNull(false) |
602 | @Column | 602 | @Column |
603 | downloadingEnabled: boolean | 603 | downloadEnabled: boolean |
604 | 604 | ||
605 | @AllowNull(false) | 605 | @AllowNull(false) |
606 | @Column | 606 | @Column |
diff --git a/server/tests/api/check-params/video-imports.ts b/server/tests/api/check-params/video-imports.ts index 8dd87b8ae..1ffb81a38 100644 --- a/server/tests/api/check-params/video-imports.ts +++ b/server/tests/api/check-params/video-imports.ts | |||
@@ -84,7 +84,7 @@ describe('Test video imports API validator', function () { | |||
84 | language: 'pt', | 84 | language: 'pt', |
85 | nsfw: false, | 85 | nsfw: false, |
86 | commentsEnabled: true, | 86 | commentsEnabled: true, |
87 | downloadingEnabled: true, | 87 | downloadEnabled: true, |
88 | waitTranscoding: true, | 88 | waitTranscoding: true, |
89 | description: 'my super description', | 89 | description: 'my super description', |
90 | support: 'my super support text', | 90 | support: 'my super support text', |
diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts index c5740087c..bc28e2422 100644 --- a/server/tests/api/check-params/videos.ts +++ b/server/tests/api/check-params/videos.ts | |||
@@ -175,7 +175,7 @@ describe('Test videos API validator', function () { | |||
175 | language: 'pt', | 175 | language: 'pt', |
176 | nsfw: false, | 176 | nsfw: false, |
177 | commentsEnabled: true, | 177 | commentsEnabled: true, |
178 | downloadingEnabled: true, | 178 | downloadEnabled: true, |
179 | waitTranscoding: true, | 179 | waitTranscoding: true, |
180 | description: 'my super description', | 180 | description: 'my super description', |
181 | support: 'my super support text', | 181 | support: 'my super support text', |
@@ -420,7 +420,7 @@ describe('Test videos API validator', function () { | |||
420 | language: 'pt', | 420 | language: 'pt', |
421 | nsfw: false, | 421 | nsfw: false, |
422 | commentsEnabled: false, | 422 | commentsEnabled: false, |
423 | downloadingEnabled: false, | 423 | downloadEnabled: false, |
424 | description: 'my super description', | 424 | description: 'my super description', |
425 | privacy: VideoPrivacy.PUBLIC, | 425 | privacy: VideoPrivacy.PUBLIC, |
426 | tags: [ 'tag1', 'tag2' ] | 426 | tags: [ 'tag1', 'tag2' ] |
diff --git a/server/tests/api/server/follows.ts b/server/tests/api/server/follows.ts index 5cad1d09d..e8914a9d4 100644 --- a/server/tests/api/server/follows.ts +++ b/server/tests/api/server/follows.ts | |||
@@ -305,7 +305,7 @@ describe('Test follows', function () { | |||
305 | }, | 305 | }, |
306 | isLocal, | 306 | isLocal, |
307 | commentsEnabled: true, | 307 | commentsEnabled: true, |
308 | downloadingEnabled: true, | 308 | downloadEnabled: true, |
309 | duration: 5, | 309 | duration: 5, |
310 | tags: [ 'tag1', 'tag2', 'tag3' ], | 310 | tags: [ 'tag1', 'tag2', 'tag3' ], |
311 | privacy: VideoPrivacy.PUBLIC, | 311 | privacy: VideoPrivacy.PUBLIC, |
diff --git a/server/tests/api/server/handle-down.ts b/server/tests/api/server/handle-down.ts index 971de4607..b0a3d029a 100644 --- a/server/tests/api/server/handle-down.ts +++ b/server/tests/api/server/handle-down.ts | |||
@@ -70,7 +70,7 @@ describe('Test handle downs', function () { | |||
70 | tags: [ 'tag1p1', 'tag2p1' ], | 70 | tags: [ 'tag1p1', 'tag2p1' ], |
71 | privacy: VideoPrivacy.PUBLIC, | 71 | privacy: VideoPrivacy.PUBLIC, |
72 | commentsEnabled: true, | 72 | commentsEnabled: true, |
73 | downloadingEnabled: true, | 73 | downloadEnabled: true, |
74 | channel: { | 74 | channel: { |
75 | name: 'root_channel', | 75 | name: 'root_channel', |
76 | displayName: 'Main root channel', | 76 | displayName: 'Main root channel', |
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index 83e391ccd..256be5d1c 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts | |||
@@ -127,7 +127,7 @@ describe('Test multiple servers', function () { | |||
127 | tags: [ 'tag1p1', 'tag2p1' ], | 127 | tags: [ 'tag1p1', 'tag2p1' ], |
128 | privacy: VideoPrivacy.PUBLIC, | 128 | privacy: VideoPrivacy.PUBLIC, |
129 | commentsEnabled: true, | 129 | commentsEnabled: true, |
130 | downloadingEnabled: true, | 130 | downloadEnabled: true, |
131 | channel: { | 131 | channel: { |
132 | displayName: 'my channel', | 132 | displayName: 'my channel', |
133 | name: 'super_channel_name', | 133 | name: 'super_channel_name', |
@@ -199,7 +199,7 @@ describe('Test multiple servers', function () { | |||
199 | }, | 199 | }, |
200 | isLocal, | 200 | isLocal, |
201 | commentsEnabled: true, | 201 | commentsEnabled: true, |
202 | downloadingEnabled: true, | 202 | downloadEnabled: true, |
203 | duration: 5, | 203 | duration: 5, |
204 | tags: [ 'tag1p2', 'tag2p2', 'tag3p2' ], | 204 | tags: [ 'tag1p2', 'tag2p2', 'tag3p2' ], |
205 | privacy: VideoPrivacy.PUBLIC, | 205 | privacy: VideoPrivacy.PUBLIC, |
@@ -308,7 +308,7 @@ describe('Test multiple servers', function () { | |||
308 | isLocal, | 308 | isLocal, |
309 | duration: 5, | 309 | duration: 5, |
310 | commentsEnabled: true, | 310 | commentsEnabled: true, |
311 | downloadingEnabled: true, | 311 | downloadEnabled: true, |
312 | tags: [ 'tag1p3' ], | 312 | tags: [ 'tag1p3' ], |
313 | privacy: VideoPrivacy.PUBLIC, | 313 | privacy: VideoPrivacy.PUBLIC, |
314 | channel: { | 314 | channel: { |
@@ -340,7 +340,7 @@ describe('Test multiple servers', function () { | |||
340 | host: 'localhost:9003' | 340 | host: 'localhost:9003' |
341 | }, | 341 | }, |
342 | commentsEnabled: true, | 342 | commentsEnabled: true, |
343 | downloadingEnabled: true, | 343 | downloadEnabled: true, |
344 | isLocal, | 344 | isLocal, |
345 | duration: 5, | 345 | duration: 5, |
346 | tags: [ 'tag2p3', 'tag3p3', 'tag4p3' ], | 346 | tags: [ 'tag2p3', 'tag3p3', 'tag4p3' ], |
@@ -658,7 +658,7 @@ describe('Test multiple servers', function () { | |||
658 | isLocal, | 658 | isLocal, |
659 | duration: 5, | 659 | duration: 5, |
660 | commentsEnabled: true, | 660 | commentsEnabled: true, |
661 | downloadingEnabled: true, | 661 | downloadEnabled: true, |
662 | tags: [ 'tag_up_1', 'tag_up_2' ], | 662 | tags: [ 'tag_up_1', 'tag_up_2' ], |
663 | privacy: VideoPrivacy.PUBLIC, | 663 | privacy: VideoPrivacy.PUBLIC, |
664 | channel: { | 664 | channel: { |
@@ -980,7 +980,7 @@ describe('Test multiple servers', function () { | |||
980 | isLocal, | 980 | isLocal, |
981 | duration: 5, | 981 | duration: 5, |
982 | commentsEnabled: false, | 982 | commentsEnabled: false, |
983 | downloadingEnabled: false, | 983 | downloadEnabled: false, |
984 | tags: [ ], | 984 | tags: [ ], |
985 | privacy: VideoPrivacy.PUBLIC, | 985 | privacy: VideoPrivacy.PUBLIC, |
986 | channel: { | 986 | channel: { |
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index 8995a8525..92d42eb80 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts | |||
@@ -55,7 +55,7 @@ describe('Test a single server', function () { | |||
55 | tags: [ 'tag1', 'tag2', 'tag3' ], | 55 | tags: [ 'tag1', 'tag2', 'tag3' ], |
56 | privacy: VideoPrivacy.PUBLIC, | 56 | privacy: VideoPrivacy.PUBLIC, |
57 | commentsEnabled: true, | 57 | commentsEnabled: true, |
58 | downloadingEnabled: true, | 58 | downloadEnabled: true, |
59 | channel: { | 59 | channel: { |
60 | displayName: 'Main root channel', | 60 | displayName: 'Main root channel', |
61 | name: 'root_channel', | 61 | name: 'root_channel', |
@@ -88,7 +88,7 @@ describe('Test a single server', function () { | |||
88 | privacy: VideoPrivacy.PUBLIC, | 88 | privacy: VideoPrivacy.PUBLIC, |
89 | duration: 5, | 89 | duration: 5, |
90 | commentsEnabled: false, | 90 | commentsEnabled: false, |
91 | downloadingEnabled: false, | 91 | downloadEnabled: false, |
92 | channel: { | 92 | channel: { |
93 | name: 'root_channel', | 93 | name: 'root_channel', |
94 | displayName: 'Main root channel', | 94 | displayName: 'Main root channel', |
@@ -358,7 +358,7 @@ describe('Test a single server', function () { | |||
358 | nsfw: false, | 358 | nsfw: false, |
359 | description: 'my super description updated', | 359 | description: 'my super description updated', |
360 | commentsEnabled: false, | 360 | commentsEnabled: false, |
361 | downloadingEnabled: false, | 361 | downloadEnabled: false, |
362 | tags: [ 'tagup1', 'tagup2' ] | 362 | tags: [ 'tagup1', 'tagup2' ] |
363 | } | 363 | } |
364 | await updateVideo(server.url, server.accessToken, videoId, attributes) | 364 | await updateVideo(server.url, server.accessToken, videoId, attributes) |
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts index a7fd4c8a6..bc878b039 100644 --- a/server/tests/utils/videos/videos.ts +++ b/server/tests/utils/videos/videos.ts | |||
@@ -27,7 +27,7 @@ type VideoAttributes = { | |||
27 | language?: string | 27 | language?: string |
28 | nsfw?: boolean | 28 | nsfw?: boolean |
29 | commentsEnabled?: boolean | 29 | commentsEnabled?: boolean |
30 | downloadingEnabled?: boolean | 30 | downloadEnabled?: boolean |
31 | waitTranscoding?: boolean | 31 | waitTranscoding?: boolean |
32 | description?: string | 32 | description?: string |
33 | tags?: string[] | 33 | tags?: string[] |
@@ -311,7 +311,7 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg | |||
311 | tags: [ 'tag' ], | 311 | tags: [ 'tag' ], |
312 | privacy: VideoPrivacy.PUBLIC, | 312 | privacy: VideoPrivacy.PUBLIC, |
313 | commentsEnabled: true, | 313 | commentsEnabled: true, |
314 | downloadingEnabled: true, | 314 | downloadEnabled: true, |
315 | fixture: 'video_short.webm' | 315 | fixture: 'video_short.webm' |
316 | }, videoAttributesArg) | 316 | }, videoAttributesArg) |
317 | 317 | ||
@@ -322,7 +322,7 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg | |||
322 | .field('name', attributes.name) | 322 | .field('name', attributes.name) |
323 | .field('nsfw', JSON.stringify(attributes.nsfw)) | 323 | .field('nsfw', JSON.stringify(attributes.nsfw)) |
324 | .field('commentsEnabled', JSON.stringify(attributes.commentsEnabled)) | 324 | .field('commentsEnabled', JSON.stringify(attributes.commentsEnabled)) |
325 | .field('downloadingEnabled', JSON.stringify(attributes.downloadingEnabled)) | 325 | .field('downloadEnabled', JSON.stringify(attributes.downloadEnabled)) |
326 | .field('waitTranscoding', JSON.stringify(attributes.waitTranscoding)) | 326 | .field('waitTranscoding', JSON.stringify(attributes.waitTranscoding)) |
327 | .field('privacy', attributes.privacy.toString()) | 327 | .field('privacy', attributes.privacy.toString()) |
328 | .field('channelId', attributes.channelId) | 328 | .field('channelId', attributes.channelId) |
@@ -373,7 +373,7 @@ function updateVideo (url: string, accessToken: string, id: number | string, att | |||
373 | if (attributes.language) body['language'] = attributes.language | 373 | if (attributes.language) body['language'] = attributes.language |
374 | if (attributes.nsfw !== undefined) body['nsfw'] = JSON.stringify(attributes.nsfw) | 374 | if (attributes.nsfw !== undefined) body['nsfw'] = JSON.stringify(attributes.nsfw) |
375 | if (attributes.commentsEnabled !== undefined) body['commentsEnabled'] = JSON.stringify(attributes.commentsEnabled) | 375 | if (attributes.commentsEnabled !== undefined) body['commentsEnabled'] = JSON.stringify(attributes.commentsEnabled) |
376 | if (attributes.downloadingEnabled !== undefined) body['downloadingEnabled'] = JSON.stringify(attributes.downloadingEnabled) | 376 | if (attributes.downloadEnabled !== undefined) body['downloadEnabled'] = JSON.stringify(attributes.downloadEnabled) |
377 | if (attributes.description) body['description'] = attributes.description | 377 | if (attributes.description) body['description'] = attributes.description |
378 | if (attributes.tags) body['tags'] = attributes.tags | 378 | if (attributes.tags) body['tags'] = attributes.tags |
379 | if (attributes.privacy) body['privacy'] = attributes.privacy | 379 | if (attributes.privacy) body['privacy'] = attributes.privacy |
@@ -439,7 +439,7 @@ async function completeVideoCheck ( | |||
439 | language: string | 439 | language: string |
440 | nsfw: boolean | 440 | nsfw: boolean |
441 | commentsEnabled: boolean | 441 | commentsEnabled: boolean |
442 | downloadingEnabled: boolean | 442 | downloadEnabled: boolean |
443 | description: string | 443 | description: string |
444 | publishedAt?: string | 444 | publishedAt?: string |
445 | support: string | 445 | support: string |
@@ -514,7 +514,7 @@ async function completeVideoCheck ( | |||
514 | expect(dateIsValid(videoDetails.channel.createdAt.toString())).to.be.true | 514 | expect(dateIsValid(videoDetails.channel.createdAt.toString())).to.be.true |
515 | expect(dateIsValid(videoDetails.channel.updatedAt.toString())).to.be.true | 515 | expect(dateIsValid(videoDetails.channel.updatedAt.toString())).to.be.true |
516 | expect(videoDetails.commentsEnabled).to.equal(attributes.commentsEnabled) | 516 | expect(videoDetails.commentsEnabled).to.equal(attributes.commentsEnabled) |
517 | expect(videoDetails.downloadingEnabled).to.equal(attributes.downloadingEnabled) | 517 | expect(videoDetails.downloadEnabled).to.equal(attributes.downloadEnabled) |
518 | 518 | ||
519 | for (const attributeFile of attributes.files) { | 519 | for (const attributeFile of attributes.files) { |
520 | const file = videoDetails.files.find(f => f.resolution.id === attributeFile.resolution) | 520 | const file = videoDetails.files.find(f => f.resolution.id === attributeFile.resolution) |
diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts index 675c621df..15f517cab 100644 --- a/server/tools/peertube-import-videos.ts +++ b/server/tools/peertube-import-videos.ts | |||
@@ -212,7 +212,7 @@ async function uploadVideoOnPeerTube (videoInfo: any, videoPath: string, cwd: st | |||
212 | nsfw: isNSFW(videoInfo), | 212 | nsfw: isNSFW(videoInfo), |
213 | waitTranscoding: true, | 213 | waitTranscoding: true, |
214 | commentsEnabled: true, | 214 | commentsEnabled: true, |
215 | downloadingEnabled: true, | 215 | downloadEnabled: true, |
216 | description: videoInfo.description || undefined, | 216 | description: videoInfo.description || undefined, |
217 | support: undefined, | 217 | support: undefined, |
218 | tags, | 218 | tags, |
diff --git a/server/tools/peertube-upload.ts b/server/tools/peertube-upload.ts index e2ba4bdbc..b17bc4288 100644 --- a/server/tools/peertube-upload.ts +++ b/server/tools/peertube-upload.ts | |||
@@ -30,7 +30,7 @@ if (!program['tags']) program['tags'] = [] | |||
30 | if (!program['nsfw']) program['nsfw'] = false | 30 | if (!program['nsfw']) program['nsfw'] = false |
31 | if (!program['privacy']) program['privacy'] = VideoPrivacy.PUBLIC | 31 | if (!program['privacy']) program['privacy'] = VideoPrivacy.PUBLIC |
32 | if (!program['commentsEnabled']) program['commentsEnabled'] = false | 32 | if (!program['commentsEnabled']) program['commentsEnabled'] = false |
33 | if (!program['downloadingEnabled']) program['downloadingEnabled'] = true | 33 | if (!program['downloadEnabled']) program['downloadEnabled'] = true |
34 | 34 | ||
35 | getSettings() | 35 | getSettings() |
36 | .then(settings => { | 36 | .then(settings => { |
@@ -117,7 +117,7 @@ async function run () { | |||
117 | description: program['videoDescription'], | 117 | description: program['videoDescription'], |
118 | tags: program['tags'], | 118 | tags: program['tags'], |
119 | commentsEnabled: program['commentsEnabled'], | 119 | commentsEnabled: program['commentsEnabled'], |
120 | downloadingEnabled: program['downloadingEnabled'], | 120 | downloadEnabled: program['downloadEnabled'], |
121 | fixture: program['file'], | 121 | fixture: program['file'], |
122 | thumbnailfile: program['thumbnail'], | 122 | thumbnailfile: program['thumbnail'], |
123 | previewfile: program['preview'], | 123 | previewfile: program['preview'], |
diff --git a/shared/models/activitypub/objects/video-torrent-object.ts b/shared/models/activitypub/objects/video-torrent-object.ts index beb2f519e..4231fbb68 100644 --- a/shared/models/activitypub/objects/video-torrent-object.ts +++ b/shared/models/activitypub/objects/video-torrent-object.ts | |||
@@ -21,7 +21,7 @@ export interface VideoTorrentObject { | |||
21 | views: number | 21 | views: number |
22 | sensitive: boolean | 22 | sensitive: boolean |
23 | commentsEnabled: boolean, | 23 | commentsEnabled: boolean, |
24 | downloadingEnabled: boolean, | 24 | downloadEnabled: boolean, |
25 | waitTranscoding: boolean | 25 | waitTranscoding: boolean |
26 | state: VideoState | 26 | state: VideoState |
27 | published: string | 27 | published: string |
diff --git a/shared/models/videos/video-create.model.ts b/shared/models/videos/video-create.model.ts index 6e5e03e0a..f153a1d00 100644 --- a/shared/models/videos/video-create.model.ts +++ b/shared/models/videos/video-create.model.ts | |||
@@ -13,7 +13,7 @@ export interface VideoCreate { | |||
13 | name: string | 13 | name: string |
14 | tags?: string[] | 14 | tags?: string[] |
15 | commentsEnabled?: boolean | 15 | commentsEnabled?: boolean |
16 | downloadingEnabled?: boolean | 16 | downloadEnabled?: boolean |
17 | privacy: VideoPrivacy | 17 | privacy: VideoPrivacy |
18 | scheduleUpdate?: VideoScheduleUpdate | 18 | scheduleUpdate?: VideoScheduleUpdate |
19 | } | 19 | } |
diff --git a/shared/models/videos/video-update.model.ts b/shared/models/videos/video-update.model.ts index bf7a9af37..6f96633ae 100644 --- a/shared/models/videos/video-update.model.ts +++ b/shared/models/videos/video-update.model.ts | |||
@@ -11,7 +11,7 @@ export interface VideoUpdate { | |||
11 | privacy?: VideoPrivacy | 11 | privacy?: VideoPrivacy |
12 | tags?: string[] | 12 | tags?: string[] |
13 | commentsEnabled?: boolean | 13 | commentsEnabled?: boolean |
14 | downloadingEnabled?: boolean | 14 | downloadEnabled?: boolean |
15 | nsfw?: boolean | 15 | nsfw?: boolean |
16 | waitTranscoding?: boolean | 16 | waitTranscoding?: boolean |
17 | channelId?: number | 17 | channelId?: number |
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts index 783cd86e5..4a792fcbc 100644 --- a/shared/models/videos/video.model.ts +++ b/shared/models/videos/video.model.ts | |||
@@ -82,7 +82,7 @@ export interface VideoDetails extends Video { | |||
82 | files: VideoFile[] | 82 | files: VideoFile[] |
83 | account: Account | 83 | account: Account |
84 | commentsEnabled: boolean | 84 | commentsEnabled: boolean |
85 | downloadingEnabled: boolean | 85 | downloadEnabled: boolean |
86 | 86 | ||
87 | // Not optional in details (unlike in Video) | 87 | // Not optional in details (unlike in Video) |
88 | waitTranscoding: boolean | 88 | waitTranscoding: boolean |
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 9ce24c0ed..8ff81d317 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml | |||
@@ -536,7 +536,7 @@ paths: | |||
536 | - $ref: "videos.yaml#/parameters/name" | 536 | - $ref: "videos.yaml#/parameters/name" |
537 | - $ref: "videos.yaml#/parameters/tags" | 537 | - $ref: "videos.yaml#/parameters/tags" |
538 | - $ref: "videos.yaml#/parameters/commentsEnabled" | 538 | - $ref: "videos.yaml#/parameters/commentsEnabled" |
539 | - $ref: "videos.yaml#/parameters/downloadingEnabled" | 539 | - $ref: "videos.yaml#/parameters/downloadEnabled" |
540 | - $ref: "videos.yaml#/parameters/privacy" | 540 | - $ref: "videos.yaml#/parameters/privacy" |
541 | - $ref: "videos.yaml#/parameters/scheduleUpdate" | 541 | - $ref: "videos.yaml#/parameters/scheduleUpdate" |
542 | responses: | 542 | responses: |
@@ -633,7 +633,7 @@ paths: | |||
633 | - $ref: "videos.yaml#/parameters/name" | 633 | - $ref: "videos.yaml#/parameters/name" |
634 | - $ref: "videos.yaml#/parameters/tags" | 634 | - $ref: "videos.yaml#/parameters/tags" |
635 | - $ref: "videos.yaml#/parameters/commentsEnabled" | 635 | - $ref: "videos.yaml#/parameters/commentsEnabled" |
636 | - $ref: "videos.yaml#/parameters/downloadingEnabled" | 636 | - $ref: "videos.yaml#/parameters/downloadEnabled" |
637 | - $ref: "videos.yaml#/parameters/privacy" | 637 | - $ref: "videos.yaml#/parameters/privacy" |
638 | - $ref: "videos.yaml#/parameters/scheduleUpdate" | 638 | - $ref: "videos.yaml#/parameters/scheduleUpdate" |
639 | responses: | 639 | responses: |
diff --git a/support/doc/api/videos.yaml b/support/doc/api/videos.yaml index 93aa26285..0c611e3a8 100644 --- a/support/doc/api/videos.yaml +++ b/support/doc/api/videos.yaml | |||
@@ -65,8 +65,8 @@ parameters: | |||
65 | in: formData | 65 | in: formData |
66 | type: boolean | 66 | type: boolean |
67 | description: 'Enable or disable comments for this video' | 67 | description: 'Enable or disable comments for this video' |
68 | downloadingEnabled: | 68 | downloadEnabled: |
69 | name: downloadingEnabled | 69 | name: downloadEnabled |
70 | in: formData | 70 | in: formData |
71 | type: boolean | 71 | type: boolean |
72 | description: 'Enable or disable downloading for this video' | 72 | description: 'Enable or disable downloading for this video' |