From 06ebe8e9c7ca14c874fc9f93e1efb7868a4caf1e Mon Sep 17 00:00:00 2001 From: killer069 <65385476+killer069@users.noreply.github.com> Date: Tue, 17 Aug 2021 11:50:50 +0530 Subject: [PATCH] Added some reconnection - logic --- package-lock.json | 4 ++-- package.json | 2 +- play-dl/YouTube/stream.ts | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4b4e244..b025d43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "play-dl", - "version": "0.1.1", + "version": "0.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "play-dl", - "version": "0.1.1", + "version": "0.1.2", "license": "MIT", "dependencies": { "got": "^11.8.2" diff --git a/package.json b/package.json index 6769990..16796e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "play-dl", - "version": "0.1.1", + "version": "0.1.2", "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 5aa38de..43427f6 100644 --- a/play-dl/YouTube/stream.ts +++ b/play-dl/YouTube/stream.ts @@ -85,5 +85,10 @@ export async function stream(url : string, options? : StreamOptions){ return got.stream(final[0].url, { retry : 5, + headers: { + 'Connection': 'keep-alive', + 'Accept-Encoding': '', + 'Accept-Language': 'en-US,en;q=0.8' + } }) } \ No newline at end of file