0.9.6
This commit is contained in:
parent
8680e4ae8a
commit
46cf8e48bd
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "play-dl",
|
"name": "play-dl",
|
||||||
"version": "0.9.6",
|
"version": "0.9.7",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "play-dl",
|
"name": "play-dl",
|
||||||
"version": "0.9.6",
|
"version": "0.9.7",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^16.9.1"
|
"@types/node": "^16.9.1"
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "play-dl",
|
"name": "play-dl",
|
||||||
"version": "0.9.6",
|
"version": "0.9.7",
|
||||||
"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",
|
||||||
|
|||||||
@ -129,7 +129,7 @@ export class Stream {
|
|||||||
this.bytes_count = 0
|
this.bytes_count = 0
|
||||||
this.video_url = video_url
|
this.video_url = video_url
|
||||||
this.cookie = cookie
|
this.cookie = cookie
|
||||||
this.timer = setInterval(() => {
|
this.timer = setTimeout(() => {
|
||||||
this.retry()
|
this.retry()
|
||||||
}, 7200 * 1000)
|
}, 7200 * 1000)
|
||||||
this.per_sec_bytes = Math.ceil(contentLength / duration)
|
this.per_sec_bytes = Math.ceil(contentLength / duration)
|
||||||
@ -157,6 +157,9 @@ export class Stream {
|
|||||||
private async retry(){
|
private async retry(){
|
||||||
let info = await video_info(this.video_url, this.cookie)
|
let info = await video_info(this.video_url, this.cookie)
|
||||||
this.url = info.format[info.format.length - 1].url
|
this.url = info.format[info.format.length - 1].url
|
||||||
|
this.timer = setTimeout(() => {
|
||||||
|
this.retry()
|
||||||
|
}, 7200 * 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
private cleanup(){
|
private cleanup(){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user