aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-03 14:10:54 +0100
committerChocobozzz <me@florianbigard.com>2020-12-03 15:21:16 +0100
commitbb4ba6d94c5051fdd665ebe63fffcc105778b8be (patch)
treed39302608c53e31395683bb5dd551eac6ced89f8 /server/models/video
parent19b7ebfaa822b12f6da25ad2ba10398b3ef25ec6 (diff)
downloadPeerTube-bb4ba6d94c5051fdd665ebe63fffcc105778b8be.tar.gz
PeerTube-bb4ba6d94c5051fdd665ebe63fffcc105778b8be.tar.zst
PeerTube-bb4ba6d94c5051fdd665ebe63fffcc105778b8be.zip
Add permanent live support
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/video-format-utils.ts4
-rw-r--r--server/models/video/video-live.ts5
2 files changed, 9 insertions, 0 deletions
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts
index b1adbcb86..a1f022fb4 100644
--- a/server/models/video/video-format-utils.ts
+++ b/server/models/video/video-format-utils.ts
@@ -360,6 +360,10 @@ function videoModelToActivityPubObject (video: MVideoAP): VideoObject {
360 ? video.VideoLive.saveReplay 360 ? video.VideoLive.saveReplay
361 : null, 361 : null,
362 362
363 permanentLive: video.isLive
364 ? video.VideoLive.permanentLive
365 : null,
366
363 state: video.state, 367 state: video.state,
364 commentsEnabled: video.commentsEnabled, 368 commentsEnabled: video.commentsEnabled,
365 downloadEnabled: video.downloadEnabled, 369 downloadEnabled: video.downloadEnabled,
diff --git a/server/models/video/video-live.ts b/server/models/video/video-live.ts
index f3bff74ea..875ba9b31 100644
--- a/server/models/video/video-live.ts
+++ b/server/models/video/video-live.ts
@@ -38,6 +38,10 @@ export class VideoLiveModel extends Model<VideoLiveModel> {
38 @Column 38 @Column
39 saveReplay: boolean 39 saveReplay: boolean
40 40
41 @AllowNull(false)
42 @Column
43 permanentLive: boolean
44
41 @CreatedAt 45 @CreatedAt
42 createdAt: Date 46 createdAt: Date
43 47
@@ -99,6 +103,7 @@ export class VideoLiveModel extends Model<VideoLiveModel> {
99 : null, 103 : null,
100 104
101 streamKey: this.streamKey, 105 streamKey: this.streamKey,
106 permanentLive: this.permanentLive,
102 saveReplay: this.saveReplay 107 saveReplay: this.saveReplay
103 } 108 }
104 } 109 }