1 import { VideoDetails } from './video-details.model'
2 import { VideoPrivacy } from '../../../../../shared/models/videos/video-privacy.enum'
4 export class VideoEdit {
12 commentsEnabled: boolean
22 constructor (videoDetails?: VideoDetails) {
24 this.id = videoDetails.id
25 this.uuid = videoDetails.uuid
26 this.category = videoDetails.category
27 this.licence = videoDetails.licence
28 this.language = videoDetails.language
29 this.description = videoDetails.description
30 this.name = videoDetails.name
31 this.tags = videoDetails.tags
32 this.nsfw = videoDetails.nsfw
33 this.commentsEnabled = videoDetails.commentsEnabled
34 this.channel = videoDetails.channel.id
35 this.privacy = videoDetails.privacy
36 this.thumbnailUrl = videoDetails.thumbnailUrl
37 this.previewUrl = videoDetails.previewUrl
41 patch (values: Object) {
42 Object.keys(values).forEach((key) => {
43 this[key] = values[key]
49 category: this.category,
50 licence: this.licence,
51 language: this.language,
52 description: this.description,
56 commentsEnabled: this.commentsEnabled,
57 channelId: this.channel,