]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-main/video/video-edit.model.ts
Add ability to set custom field to video form
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / video / video-edit.model.ts
index 6a529e0523e934e7a9328c65998b13e7fee89816..757b686c01149d31326839cd11f73cfa3bc84769 100644 (file)
@@ -25,6 +25,8 @@ export class VideoEdit implements VideoUpdate {
   scheduleUpdate?: VideoScheduleUpdate
   originallyPublishedAt?: Date | string
 
+  pluginData?: any
+
   constructor (
     video?: Video & {
       tags: string[],
@@ -55,10 +57,12 @@ 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 ]
     })