1 import { VideoDetails } from './video-details.model'
2 import { VideoPrivacy } from '../../../../../shared/models/videos/video-privacy.enum'
3 import { VideoUpdate } from '../../../../../shared/models/videos'
5 export class VideoEdit implements VideoUpdate {
13 commentsEnabled: boolean
14 waitTranscoding: boolean
25 constructor (videoDetails?: VideoDetails) {
27 this.id = videoDetails.id
28 this.uuid = videoDetails.uuid
29 this.category = videoDetails.category.id
30 this.licence = videoDetails.licence.id
31 this.language = videoDetails.language.id
32 this.description = videoDetails.description
33 this.name = videoDetails.name
34 this.tags = videoDetails.tags
35 this.nsfw = videoDetails.nsfw
36 this.commentsEnabled = videoDetails.commentsEnabled
37 this.waitTranscoding = videoDetails.waitTranscoding
38 this.channelId = videoDetails.channel.id
39 this.privacy = videoDetails.privacy.id
40 this.support = videoDetails.support
41 this.thumbnailUrl = videoDetails.thumbnailUrl
42 this.previewUrl = videoDetails.previewUrl
46 patch (values: Object) {
47 Object.keys(values).forEach((key) => {
48 this[ key ] = values[ key ]
54 category: this.category,
55 licence: this.licence,
56 language: this.language,
57 description: this.description,
58 support: this.support,
62 commentsEnabled: this.commentsEnabled,
63 waitTranscoding: this.waitTranscoding,
64 channelId: this.channelId,