]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-format-utils.ts
Generate a name for thumbnails
[github/Chocobozzz/PeerTube.git] / server / models / video / video-format-utils.ts
index b1adbcb86ff19e3171cd662b94a1ca08f9bc1b11..77b8bcfe349d37d0862893f36e377ec3ef12525d 100644 (file)
@@ -82,9 +82,9 @@ function videoModelToFormattedJSON (video: MVideoFormattable, options?: VideoFor
     account: video.VideoChannel.Account.toFormattedSummaryJSON(),
     channel: video.VideoChannel.toFormattedSummaryJSON(),
 
-    userHistory: userHistory ? {
-      currentTime: userHistory.currentTime
-    } : undefined,
+    userHistory: userHistory
+      ? { currentTime: userHistory.currentTime }
+      : undefined,
 
     // Can be added by external plugins
     pluginData: (video as any).pluginData
@@ -360,6 +360,10 @@ function videoModelToActivityPubObject (video: MVideoAP): VideoObject {
       ? video.VideoLive.saveReplay
       : null,
 
+    permanentLive: video.isLive
+      ? video.VideoLive.permanentLive
+      : null,
+
     state: video.state,
     commentsEnabled: video.commentsEnabled,
     downloadEnabled: video.downloadEnabled,