From 2186386cca113506791583cb07d6ccacba7af4e0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 12 Jun 2018 20:04:58 +0200 Subject: Add concept of video state, and add ability to wait transcoding before publishing a video --- client/src/app/shared/video/video-edit.model.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'client/src/app/shared/video/video-edit.model.ts') diff --git a/client/src/app/shared/video/video-edit.model.ts b/client/src/app/shared/video/video-edit.model.ts index ad2929db5..f045a3acd 100644 --- a/client/src/app/shared/video/video-edit.model.ts +++ b/client/src/app/shared/video/video-edit.model.ts @@ -1,7 +1,8 @@ import { VideoDetails } from './video-details.model' import { VideoPrivacy } from '../../../../../shared/models/videos/video-privacy.enum' +import { VideoUpdate } from '../../../../../shared/models/videos' -export class VideoEdit { +export class VideoEdit implements VideoUpdate { category: number licence: number language: string @@ -10,6 +11,7 @@ export class VideoEdit { tags: string[] nsfw: boolean commentsEnabled: boolean + waitTranscoding: boolean channelId: number privacy: VideoPrivacy support: string @@ -32,6 +34,7 @@ export class VideoEdit { this.tags = videoDetails.tags this.nsfw = videoDetails.nsfw this.commentsEnabled = videoDetails.commentsEnabled + this.waitTranscoding = videoDetails.waitTranscoding this.channelId = videoDetails.channel.id this.privacy = videoDetails.privacy.id this.support = videoDetails.support @@ -42,7 +45,7 @@ export class VideoEdit { patch (values: Object) { Object.keys(values).forEach((key) => { - this[key] = values[key] + this[ key ] = values[ key ] }) } @@ -57,6 +60,7 @@ export class VideoEdit { tags: this.tags, nsfw: this.nsfw, commentsEnabled: this.commentsEnabled, + waitTranscoding: this.waitTranscoding, channelId: this.channelId, privacy: this.privacy } -- cgit v1.2.3