This commit is contained in:
killer069
2021-09-13 11:27:10 +05:30
parent 8680e4ae8a
commit 46cf8e48bd
3 changed files with 7 additions and 4 deletions

View File

@@ -129,7 +129,7 @@ export class Stream {
this.bytes_count = 0
this.video_url = video_url
this.cookie = cookie
this.timer = setInterval(() => {
this.timer = setTimeout(() => {
this.retry()
}, 7200 * 1000)
this.per_sec_bytes = Math.ceil(contentLength / duration)
@@ -157,6 +157,9 @@ export class Stream {
private async retry(){
let info = await video_info(this.video_url, this.cookie)
this.url = info.format[info.format.length - 1].url
this.timer = setTimeout(() => {
this.retry()
}, 7200 * 1000)
}
private cleanup(){