From 96ae7eb0bdba60d13ab3a6d43b250356dbd65ff6 Mon Sep 17 00:00:00 2001 From: killer069 <65385476+killer069@users.noreply.github.com> Date: Sun, 29 Aug 2021 18:55:33 +0530 Subject: [PATCH] Non-useful async removed --- play-dl/YouTube/stream.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/play-dl/YouTube/stream.ts b/play-dl/YouTube/stream.ts index 2cffd42..ae40fdf 100644 --- a/play-dl/YouTube/stream.ts +++ b/play-dl/YouTube/stream.ts @@ -39,7 +39,7 @@ export async function stream(url : string): Promise{ +export function stream_from_info(info : InfoData): Stream | LiveStreaming | LiveEnded{ let final: any[] = []; let type : StreamType; if(info.LiveStreamData.isLive === true && info.LiveStreamData.hlsManifestUrl !== null) { - return await live_stream(info as InfoData) + return live_stream(info as InfoData) } let audioFormat = parseAudioFormats(info.format) @@ -97,7 +97,7 @@ function filterFormat(formats : any[], codec : string){ return result } -async function live_stream(info : InfoData): Promise{ +function live_stream(info : InfoData): LiveStreaming | LiveEnded{ let stream : LiveStreaming | LiveEnded if(info.video_details.durationInSec === '0') { stream = new LiveStreaming(info.LiveStreamData.dashManifestUrl, info.format[info.format.length - 1].targetDurationSec)