aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/videos/live-command.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/videos/live-command.ts')
-rw-r--r--shared/extra-utils/videos/live-command.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/shared/extra-utils/videos/live-command.ts b/shared/extra-utils/videos/live-command.ts
index 4f03c9127..a494e60fa 100644
--- a/shared/extra-utils/videos/live-command.ts
+++ b/shared/extra-utils/videos/live-command.ts
@@ -5,9 +5,8 @@ import { omit } from 'lodash'
5import { join } from 'path' 5import { join } from 'path'
6import { LiveVideo, LiveVideoCreate, LiveVideoUpdate, VideoCreateResult, VideoDetails, VideoState } from '@shared/models' 6import { LiveVideo, LiveVideoCreate, LiveVideoUpdate, VideoCreateResult, VideoDetails, VideoState } from '@shared/models'
7import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes' 7import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes'
8import { buildServerDirectory, wait } from '../miscs/miscs' 8import { wait } from '../miscs'
9import { unwrapBody } from '../requests' 9import { unwrapBody } from '../requests'
10import { waitUntilLog } from '../server/servers'
11import { AbstractCommand, OverrideCommandOptions } from '../shared' 10import { AbstractCommand, OverrideCommandOptions } from '../shared'
12import { sendRTMPStream, testFfmpegStreamError } from './live' 11import { sendRTMPStream, testFfmpegStreamError } from './live'
13import { getVideoWithToken } from './videos' 12import { getVideoWithToken } from './videos'
@@ -116,7 +115,7 @@ export class LiveCommand extends AbstractCommand {
116 const { resolution, segment, videoUUID } = options 115 const { resolution, segment, videoUUID } = options
117 const segmentName = `${resolution}-00000${segment}.ts` 116 const segmentName = `${resolution}-00000${segment}.ts`
118 117
119 return waitUntilLog(this.server, `${videoUUID}/${segmentName}`, 2, false) 118 return this.server.serversCommand.waitUntilLog(`${videoUUID}/${segmentName}`, 2, false)
120 } 119 }
121 120
122 async waitUntilSaved (options: OverrideCommandOptions & { 121 async waitUntilSaved (options: OverrideCommandOptions & {
@@ -135,7 +134,7 @@ export class LiveCommand extends AbstractCommand {
135 async countPlaylists (options: OverrideCommandOptions & { 134 async countPlaylists (options: OverrideCommandOptions & {
136 videoUUID: string 135 videoUUID: string
137 }) { 136 }) {
138 const basePath = buildServerDirectory(this.server, 'streaming-playlists') 137 const basePath = this.server.serversCommand.buildDirectory('streaming-playlists')
139 const hlsPath = join(basePath, 'hls', options.videoUUID) 138 const hlsPath = join(basePath, 'hls', options.videoUUID)
140 139
141 const files = await readdir(hlsPath) 140 const files = await readdir(hlsPath)