From d23dd9fbfc4d26026352c10f81d2795ceaf2908a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 15 Jul 2021 10:02:54 +0200 Subject: Introduce videos command --- shared/extra-utils/videos/live-command.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'shared/extra-utils/videos/live-command.ts') diff --git a/shared/extra-utils/videos/live-command.ts b/shared/extra-utils/videos/live-command.ts index a494e60fa..5adf601cc 100644 --- a/shared/extra-utils/videos/live-command.ts +++ b/shared/extra-utils/videos/live-command.ts @@ -9,7 +9,6 @@ import { wait } from '../miscs' import { unwrapBody } from '../requests' import { AbstractCommand, OverrideCommandOptions } from '../shared' import { sendRTMPStream, testFfmpegStreamError } from './live' -import { getVideoWithToken } from './videos' export class LiveCommand extends AbstractCommand { @@ -124,8 +123,7 @@ export class LiveCommand extends AbstractCommand { let video: VideoDetails do { - const res = await getVideoWithToken(this.server.url, options.token ?? this.server.accessToken, options.videoId) - video = res.body + video = await this.server.videosCommand.getWithToken({ token: options.token, id: options.videoId }) await wait(500) } while (video.isLive === true && video.state.id !== VideoState.PUBLISHED) @@ -149,8 +147,7 @@ export class LiveCommand extends AbstractCommand { let video: VideoDetails do { - const res = await getVideoWithToken(this.server.url, options.token ?? this.server.accessToken, options.videoId) - video = res.body + video = await this.server.videosCommand.getWithToken({ token: options.token, id: options.videoId }) await wait(500) } while (video.state.id !== options.state) -- cgit v1.2.3