1 import { VideoDetails } from './video-details.model'
2 import { VideoPrivacy } from '../../../../../shared/models/videos/video-privacy.enum'
4 export class VideoEdit {
12 commentsEnabled: boolean
23 constructor (videoDetails?: VideoDetails) {
25 this.id = videoDetails.id
26 this.uuid = videoDetails.uuid
27 this.category = videoDetails.category
28 this.licence = videoDetails.licence
29 this.language = videoDetails.language
30 this.description = videoDetails.description
31 this.name = videoDetails.name
32 this.tags = videoDetails.tags
33 this.nsfw = videoDetails.nsfw
34 this.commentsEnabled = videoDetails.commentsEnabled
35 this.channel = videoDetails.channel.id
36 this.privacy = videoDetails.privacy
37 this.support = videoDetails.support
38 this.thumbnailUrl = videoDetails.thumbnailUrl
39 this.previewUrl = videoDetails.previewUrl
43 patch (values: Object) {
44 Object.keys(values).forEach((key) => {
45 this[key] = values[key]
51 category: this.category,
52 licence: this.licence,
53 language: this.language,
54 description: this.description,
55 support: this.support,
59 commentsEnabled: this.commentsEnabled,
60 channelId: this.channel,