aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/videos/live.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/server-commands/videos/live.ts')
-rw-r--r--shared/server-commands/videos/live.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/shared/server-commands/videos/live.ts b/shared/server-commands/videos/live.ts
index 0d9c32aab..ee7444b64 100644
--- a/shared/server-commands/videos/live.ts
+++ b/shared/server-commands/videos/live.ts
@@ -1,6 +1,6 @@
1import ffmpeg, { FfmpegCommand } from 'fluent-ffmpeg' 1import ffmpeg, { FfmpegCommand } from 'fluent-ffmpeg'
2import { buildAbsoluteFixturePath, wait } from '@shared/core-utils' 2import { buildAbsoluteFixturePath, wait } from '@shared/core-utils'
3import { VideoDetails, VideoInclude } from '@shared/models' 3import { VideoDetails, VideoInclude, VideoPrivacy } from '@shared/models'
4import { PeerTubeServer } from '../server/server' 4import { PeerTubeServer } from '../server/server'
5 5
6function sendRTMPStream (options: { 6function sendRTMPStream (options: {
@@ -98,7 +98,10 @@ async function waitUntilLiveReplacedByReplayOnAllServers (servers: PeerTubeServe
98} 98}
99 99
100async function findExternalSavedVideo (server: PeerTubeServer, liveDetails: VideoDetails) { 100async function findExternalSavedVideo (server: PeerTubeServer, liveDetails: VideoDetails) {
101 const { data } = await server.videos.list({ token: server.accessToken, sort: '-publishedAt', include: VideoInclude.BLACKLISTED }) 101 const include = VideoInclude.BLACKLISTED
102 const privacyOneOf = [ VideoPrivacy.INTERNAL, VideoPrivacy.PRIVATE, VideoPrivacy.PUBLIC, VideoPrivacy.UNLISTED ]
103
104 const { data } = await server.videos.list({ token: server.accessToken, sort: '-publishedAt', include, privacyOneOf })
102 105
103 return data.find(v => v.name === liveDetails.name + ' - ' + new Date(liveDetails.publishedAt).toLocaleString()) 106 return data.find(v => v.name === liveDetails.name + ' - ' + new Date(liveDetails.publishedAt).toLocaleString())
104} 107}