diff options
author | Chocobozzz <me@florianbigard.com> | 2020-12-03 14:10:54 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-12-03 15:21:16 +0100 |
commit | bb4ba6d94c5051fdd665ebe63fffcc105778b8be (patch) | |
tree | d39302608c53e31395683bb5dd551eac6ced89f8 /server/controllers/api/videos/live.ts | |
parent | 19b7ebfaa822b12f6da25ad2ba10398b3ef25ec6 (diff) | |
download | PeerTube-bb4ba6d94c5051fdd665ebe63fffcc105778b8be.tar.gz PeerTube-bb4ba6d94c5051fdd665ebe63fffcc105778b8be.tar.zst PeerTube-bb4ba6d94c5051fdd665ebe63fffcc105778b8be.zip |
Add permanent live support
Diffstat (limited to 'server/controllers/api/videos/live.ts')
-rw-r--r-- | server/controllers/api/videos/live.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/videos/live.ts b/server/controllers/api/videos/live.ts index a6f00c1bd..e67d89612 100644 --- a/server/controllers/api/videos/live.ts +++ b/server/controllers/api/videos/live.ts | |||
@@ -67,7 +67,9 @@ async function updateLiveVideo (req: express.Request, res: express.Response) { | |||
67 | 67 | ||
68 | const video = res.locals.videoAll | 68 | const video = res.locals.videoAll |
69 | const videoLive = res.locals.videoLive | 69 | const videoLive = res.locals.videoLive |
70 | |||
70 | videoLive.saveReplay = body.saveReplay || false | 71 | videoLive.saveReplay = body.saveReplay || false |
72 | videoLive.permanentLive = body.permanentLive || false | ||
71 | 73 | ||
72 | video.VideoLive = await videoLive.save() | 74 | video.VideoLive = await videoLive.save() |
73 | 75 | ||
@@ -90,6 +92,7 @@ async function addLiveVideo (req: express.Request, res: express.Response) { | |||
90 | 92 | ||
91 | const videoLive = new VideoLiveModel() | 93 | const videoLive = new VideoLiveModel() |
92 | videoLive.saveReplay = videoInfo.saveReplay || false | 94 | videoLive.saveReplay = videoInfo.saveReplay || false |
95 | videoLive.permanentLive = videoInfo.permanentLive || false | ||
93 | videoLive.streamKey = uuidv4() | 96 | videoLive.streamKey = uuidv4() |
94 | 97 | ||
95 | const [ thumbnailModel, previewModel ] = await buildVideoThumbnailsFromReq({ | 98 | const [ thumbnailModel, previewModel ] = await buildVideoThumbnailsFromReq({ |