aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/extra-utils/videos/live.ts10
-rw-r--r--shared/models/activitypub/objects/video-torrent-object.ts1
-rw-r--r--shared/models/videos/live/live-video-create.model.ts1
-rw-r--r--shared/models/videos/live/live-video-update.model.ts1
-rw-r--r--shared/models/videos/live/live-video.model.ts1
5 files changed, 14 insertions, 0 deletions
diff --git a/shared/extra-utils/videos/live.ts b/shared/extra-utils/videos/live.ts
index 346134969..522beb8bc 100644
--- a/shared/extra-utils/videos/live.ts
+++ b/shared/extra-utils/videos/live.ts
@@ -177,10 +177,20 @@ async function checkLiveCleanup (server: ServerInfo, videoUUID: string, resoluti
177 expect(files).to.contain('segments-sha256.json') 177 expect(files).to.contain('segments-sha256.json')
178} 178}
179 179
180async function getPlaylistsCount (server: ServerInfo, videoUUID: string) {
181 const basePath = buildServerDirectory(server, 'streaming-playlists')
182 const hlsPath = join(basePath, 'hls', videoUUID)
183
184 const files = await readdir(hlsPath)
185
186 return files.filter(f => f.endsWith('.m3u8')).length
187}
188
180// --------------------------------------------------------------------------- 189// ---------------------------------------------------------------------------
181 190
182export { 191export {
183 getLive, 192 getLive,
193 getPlaylistsCount,
184 waitUntilLivePublished, 194 waitUntilLivePublished,
185 updateLive, 195 updateLive,
186 waitUntilLiveStarts, 196 waitUntilLiveStarts,
diff --git a/shared/models/activitypub/objects/video-torrent-object.ts b/shared/models/activitypub/objects/video-torrent-object.ts
index d99d273c3..6d18e93d5 100644
--- a/shared/models/activitypub/objects/video-torrent-object.ts
+++ b/shared/models/activitypub/objects/video-torrent-object.ts
@@ -24,6 +24,7 @@ export interface VideoObject {
24 24
25 isLiveBroadcast: boolean 25 isLiveBroadcast: boolean
26 liveSaveReplay: boolean 26 liveSaveReplay: boolean
27 permanentLive: boolean
27 28
28 commentsEnabled: boolean 29 commentsEnabled: boolean
29 downloadEnabled: boolean 30 downloadEnabled: boolean
diff --git a/shared/models/videos/live/live-video-create.model.ts b/shared/models/videos/live/live-video-create.model.ts
index 1ef4b70dd..caa7acc17 100644
--- a/shared/models/videos/live/live-video-create.model.ts
+++ b/shared/models/videos/live/live-video-create.model.ts
@@ -2,4 +2,5 @@ import { VideoCreate } from '../video-create.model'
2 2
3export interface LiveVideoCreate extends VideoCreate { 3export interface LiveVideoCreate extends VideoCreate {
4 saveReplay?: boolean 4 saveReplay?: boolean
5 permanentLive?: boolean
5} 6}
diff --git a/shared/models/videos/live/live-video-update.model.ts b/shared/models/videos/live/live-video-update.model.ts
index 0f0f67d06..a39c44797 100644
--- a/shared/models/videos/live/live-video-update.model.ts
+++ b/shared/models/videos/live/live-video-update.model.ts
@@ -1,3 +1,4 @@
1export interface LiveVideoUpdate { 1export interface LiveVideoUpdate {
2 permanentLive?: boolean
2 saveReplay?: boolean 3 saveReplay?: boolean
3} 4}
diff --git a/shared/models/videos/live/live-video.model.ts b/shared/models/videos/live/live-video.model.ts
index a3f8275e3..d6e9a50d1 100644
--- a/shared/models/videos/live/live-video.model.ts
+++ b/shared/models/videos/live/live-video.model.ts
@@ -2,4 +2,5 @@ export interface LiveVideo {
2 rtmpUrl: string 2 rtmpUrl: string
3 streamKey: string 3 streamKey: string
4 saveReplay: boolean 4 saveReplay: boolean
5 permanentLive: boolean
5} 6}