Small Patch for long streams

This commit is contained in:
killer069 2021-09-01 11:11:30 +05:30
parent 283eabd3c9
commit bca50b2395
5 changed files with 12 additions and 5 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "play-dl", "name": "play-dl",
"version": "0.7.3", "version": "0.7.4",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "play-dl", "name": "play-dl",
"version": "0.7.3", "version": "0.7.4",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"got": "^11.8.2" "got": "^11.8.2"

View File

@ -1,6 +1,6 @@
{ {
"name": "play-dl", "name": "play-dl",
"version": "0.7.3", "version": "0.7.4",
"description": "YouTube, SoundCloud, Spotify streaming for discord.js bots", "description": "YouTube, SoundCloud, Spotify streaming for discord.js bots",
"main": "dist/index.js", "main": "dist/index.js",
"typings": "dist/index.d.ts", "typings": "dist/index.d.ts",

View File

@ -276,6 +276,6 @@ export class Stream {
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.loop() this.loop()
}, 300 * 1000) }, 280 * 1000)
} }
} }

View File

@ -37,6 +37,7 @@ export async function video_basic_info(url : string){
let html5player = 'https://www.youtube.com' + body.split('"jsUrl":"')[1].split('"')[0] let html5player = 'https://www.youtube.com' + body.split('"jsUrl":"')[1].split('"')[0]
let format = [] let format = []
let vid = player_response.videoDetails let vid = player_response.videoDetails
console.log(vid.thumbnail.thumbnails)
let microformat = player_response.microformat.playerMicroformatRenderer let microformat = player_response.microformat.playerMicroformatRenderer
let video_details = { let video_details = {
id : vid.videoId, id : vid.videoId,

View File

@ -1 +1,7 @@
export { playlist_info, video_basic_info, video_info, search, stream, stream_from_info, validate, validate_playlist } from "./YouTube"; export { playlist_info, video_basic_info, video_info, search, stream, stream_from_info, validate, validate_playlist } from "./YouTube";
import { video_basic_info } from '.'
(async() => {
let vid = await video_basic_info('https://www.youtube.com/watch?v=ALZHF5UqnU4')
})()