]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-main/video/video-edit.model.ts
Fix button icon margin
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / video / video-edit.model.ts
index 6a529e0523e934e7a9328c65998b13e7fee89816..3922ee42a9540f9f23ce23bc42bc278e6dd1587e 100644 (file)
@@ -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