aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
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/models/video
parent35d50b7dd26b3cf646b8845784927bb1ef18dfb3 (diff)
downloadPeerTube-156c50af3085468a47b8ae73fe8cfcae46b42398.tar.gz
PeerTube-156c50af3085468a47b8ae73fe8cfcae46b42398.tar.zst
PeerTube-156c50af3085468a47b8ae73fe8cfcae46b42398.zip
Add downloadingEnabled property to video model
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/video-format-utils.ts2
-rw-r--r--server/models/video/video.ts4
2 files changed, 6 insertions, 0 deletions
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts
index 905e84449..0b0da4181 100644
--- a/server/models/video/video-format-utils.ts
+++ b/server/models/video/video-format-utils.ts
@@ -128,6 +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 waitTranscoding: video.waitTranscoding, 132 waitTranscoding: video.waitTranscoding,
132 state: { 133 state: {
133 id: video.state, 134 id: video.state,
@@ -259,6 +260,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject {
259 waitTranscoding: video.waitTranscoding, 260 waitTranscoding: video.waitTranscoding,
260 state: video.state, 261 state: video.state,
261 commentsEnabled: video.commentsEnabled, 262 commentsEnabled: video.commentsEnabled,
263 downloadingEnabled: video.downloadingEnabled,
262 published: video.publishedAt.toISOString(), 264 published: video.publishedAt.toISOString(),
263 updated: video.updatedAt.toISOString(), 265 updated: video.updatedAt.toISOString(),
264 mediaType: 'text/markdown', 266 mediaType: 'text/markdown',
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 46d823240..a2fe53fb9 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -600,6 +600,10 @@ export class VideoModel extends Model<VideoModel> {
600 600
601 @AllowNull(false) 601 @AllowNull(false)
602 @Column 602 @Column
603 downloadingEnabled: boolean
604
605 @AllowNull(false)
606 @Column
603 waitTranscoding: boolean 607 waitTranscoding: boolean
604 608
605 @AllowNull(false) 609 @AllowNull(false)