1 import { VideoDetails } from './video-details.model'
2 import { VideoPrivacy } from '../../../../../shared/models/videos/video-privacy.enum'
4 export class VideoEdit {
12 commentsEnabled: boolean
18 constructor (videoDetails?: VideoDetails) {
20 this.id = videoDetails.id
21 this.uuid = videoDetails.uuid
22 this.category = videoDetails.category
23 this.licence = videoDetails.licence
24 this.language = videoDetails.language
25 this.description = videoDetails.description
26 this.name = videoDetails.name
27 this.tags = videoDetails.tags
28 this.nsfw = videoDetails.nsfw
29 this.commentsEnabled = videoDetails.commentsEnabled
30 this.channel = videoDetails.channel.id
31 this.privacy = videoDetails.privacy
35 patch (values: Object) {
36 Object.keys(values).forEach((key) => {
37 this[key] = values[key]
43 category: this.category,
44 licence: this.licence,
45 language: this.language,
46 description: this.description,
50 commentsEnabled: this.commentsEnabled,
51 channelId: this.channel,