X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-main%2Fvideo%2Fvideo-edit.model.ts;h=3922ee42a9540f9f23ce23bc42bc278e6dd1587e;hb=db129781cabca2c66d18cd1dcdfe40f87e9ec030;hp=6a529e0523e934e7a9328c65998b13e7fee89816;hpb=67ed6552b831df66713bac9e672738796128d33f;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-main/video/video-edit.model.ts b/client/src/app/shared/shared-main/video/video-edit.model.ts index 6a529e052..3922ee42a 100644 --- a/client/src/app/shared/shared-main/video/video-edit.model.ts +++ b/client/src/app/shared/shared-main/video/video-edit.model.ts @@ -20,23 +20,28 @@ export class VideoEdit implements VideoUpdate { previewfile?: any thumbnailUrl: string previewUrl: string - uuid?: string - id?: number scheduleUpdate?: VideoScheduleUpdate originallyPublishedAt?: Date | string + id?: number + uuid?: string + shortUUID?: string + + pluginData?: any + constructor ( video?: Video & { - tags: string[], - commentsEnabled: boolean, - downloadEnabled: boolean, - support: string, - thumbnailUrl: string, + tags: string[] + commentsEnabled: boolean + downloadEnabled: boolean + support: string + thumbnailUrl: string previewUrl: string }) { if (video) { this.id = video.id this.uuid = video.uuid + this.shortUUID = video.shortUUID this.category = video.category.id this.licence = video.licence.id this.language = video.language.id @@ -55,12 +60,14 @@ export class VideoEdit implements VideoUpdate { this.scheduleUpdate = video.scheduledUpdate this.originallyPublishedAt = video.originallyPublishedAt ? new Date(video.originallyPublishedAt) : null + + this.pluginData = video.pluginData } } - patch (values: { [ id: string ]: string }) { + patch (values: { [ id: string ]: any }) { Object.keys(values).forEach((key) => { - this[ key ] = values[ key ] + this[key] = values[key] }) // If schedule publication, the video is private and will be changed to public privacy