diff --git a/package-lock.json b/package-lock.json index 6897c24..eda595b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "play-dl", - "version": "0.2.7", + "version": "0.3.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "play-dl", - "version": "0.2.6", + "version": "0.3.0", "license": "MIT", "dependencies": { "got": "^11.8.2" diff --git a/package.json b/package.json index f7ae003..73398dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "play-dl", - "version": "0.2.7", + "version": "0.3.0", "description": "YouTube, SoundCloud, Spotify downloader", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/play-dl/YouTube/stream.ts b/play-dl/YouTube/stream.ts index b2c75db..7b97db8 100644 --- a/play-dl/YouTube/stream.ts +++ b/play-dl/YouTube/stream.ts @@ -42,6 +42,8 @@ export async function stream(url : string, options : StreamOptions = { actual_li let info = await video_info(url) let final: any[] = []; let type : StreamType; + if(!options.actual_live) options.actual_live = false + if(!options.preferred_quality) options.preferred_quality = "144p" if(info.LiveStreamData.isLive === true && info.LiveStreamData.hlsManifestUrl !== null) { return await live_stream(info as InfoData, options) } @@ -69,6 +71,8 @@ export async function stream(url : string, options : StreamOptions = { actual_li export async function stream_from_info(info : InfoData, options : StreamOptions = { actual_live : false, preferred_quality : "144p" }): Promise{ let final: any[] = []; let type : StreamType; + if(!options.actual_live) options.actual_live = false + if(!options.preferred_quality) options.preferred_quality = "144p" if(info.LiveStreamData.isLive === true && info.LiveStreamData.hlsManifestUrl !== null) { return await live_stream(info as InfoData, options) } @@ -113,10 +117,10 @@ async function live_stream(info : InfoData, options : StreamOptions): Promise