From 156c50af3085468a47b8ae73fe8cfcae46b42398 Mon Sep 17 00:00:00 2001 From: Lucas Declercq Date: Sat, 6 Oct 2018 19:17:21 +0200 Subject: Add downloadingEnabled property to video model --- server/models/video/video-format-utils.ts | 2 ++ server/models/video/video.ts | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'server/models') 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 { account: video.VideoChannel.Account.toFormattedJSON(), tags, commentsEnabled: video.commentsEnabled, + downloadingEnabled: video.downloadingEnabled, waitTranscoding: video.waitTranscoding, state: { id: video.state, @@ -259,6 +260,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject { waitTranscoding: video.waitTranscoding, state: video.state, commentsEnabled: video.commentsEnabled, + downloadingEnabled: video.downloadingEnabled, published: video.publishedAt.toISOString(), updated: video.updatedAt.toISOString(), 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 @@ -598,6 +598,10 @@ export class VideoModel extends Model { @Column commentsEnabled: boolean + @AllowNull(false) + @Column + downloadingEnabled: boolean + @AllowNull(false) @Column waitTranscoding: boolean -- cgit v1.2.3