diff options
Diffstat (limited to 'shared/extra-utils/videos/live-command.ts')
-rw-r--r-- | shared/extra-utils/videos/live-command.ts | 7 |
1 files changed, 2 insertions, 5 deletions
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' | |||
9 | import { unwrapBody } from '../requests' | 9 | import { unwrapBody } from '../requests' |
10 | import { AbstractCommand, OverrideCommandOptions } from '../shared' | 10 | import { AbstractCommand, OverrideCommandOptions } from '../shared' |
11 | import { sendRTMPStream, testFfmpegStreamError } from './live' | 11 | import { sendRTMPStream, testFfmpegStreamError } from './live' |
12 | import { getVideoWithToken } from './videos' | ||
13 | 12 | ||
14 | export class LiveCommand extends AbstractCommand { | 13 | export class LiveCommand extends AbstractCommand { |
15 | 14 | ||
@@ -124,8 +123,7 @@ export class LiveCommand extends AbstractCommand { | |||
124 | let video: VideoDetails | 123 | let video: VideoDetails |
125 | 124 | ||
126 | do { | 125 | do { |
127 | const res = await getVideoWithToken(this.server.url, options.token ?? this.server.accessToken, options.videoId) | 126 | video = await this.server.videosCommand.getWithToken({ token: options.token, id: options.videoId }) |
128 | video = res.body | ||
129 | 127 | ||
130 | await wait(500) | 128 | await wait(500) |
131 | } while (video.isLive === true && video.state.id !== VideoState.PUBLISHED) | 129 | } while (video.isLive === true && video.state.id !== VideoState.PUBLISHED) |
@@ -149,8 +147,7 @@ export class LiveCommand extends AbstractCommand { | |||
149 | let video: VideoDetails | 147 | let video: VideoDetails |
150 | 148 | ||
151 | do { | 149 | do { |
152 | const res = await getVideoWithToken(this.server.url, options.token ?? this.server.accessToken, options.videoId) | 150 | video = await this.server.videosCommand.getWithToken({ token: options.token, id: options.videoId }) |
153 | video = res.body | ||
154 | 151 | ||
155 | await wait(500) | 152 | await wait(500) |
156 | } while (video.state.id !== options.state) | 153 | } while (video.state.id !== options.state) |