1 import { VideoDetails } from './video-details.model'
2 import { VideoPrivacy } from '../../../../../shared/models/videos/video-privacy.enum'
4 export class VideoEdit {
17 constructor (videoDetails?: VideoDetails) {
19 this.id = videoDetails.id
20 this.uuid = videoDetails.uuid
21 this.category = videoDetails.category
22 this.licence = videoDetails.licence
23 this.language = videoDetails.language
24 this.description = videoDetails.description
25 this.name = videoDetails.name
26 this.tags = videoDetails.tags
27 this.nsfw = videoDetails.nsfw
28 this.channel = videoDetails.channel.id
29 this.privacy = videoDetails.privacy
33 patch (values: Object) {
34 Object.keys(values).forEach((key) => {
35 this[key] = values[key]
41 category: this.category,
42 licence: this.licence,
43 language: this.language,
44 description: this.description,
48 channel: this.channel,