added cookie parameter in retry options
This commit is contained in:
parent
fb04bbed4d
commit
3cd8d36aa7
@ -50,7 +50,7 @@ export async function stream(url : string, cookie? : string): Promise<Stream | L
|
||||
return 0
|
||||
})
|
||||
if(resp === 0){
|
||||
return await stream(info.video_details.url)
|
||||
return await stream(info.video_details.url, cookie)
|
||||
}
|
||||
else if(typeof resp !== "number") resp.destroy()
|
||||
|
||||
@ -74,7 +74,7 @@ export async function stream(url : string, cookie? : string): Promise<Stream | L
|
||||
return new Stream(final[0].url, type, info.video_details.durationInSec, Number(final[0].contentLength))
|
||||
}
|
||||
|
||||
export async function stream_from_info(info : InfoData): Promise<Stream | LiveStreaming>{
|
||||
export async function stream_from_info(info : InfoData, cookie? : string): Promise<Stream | LiveStreaming>{
|
||||
let final: any[] = [];
|
||||
let type : StreamType;
|
||||
if(info.LiveStreamData.isLive === true && info.LiveStreamData.hlsManifestUrl !== null && info.video_details.durationInSec === '0') {
|
||||
@ -90,7 +90,7 @@ export async function stream_from_info(info : InfoData): Promise<Stream | LiveSt
|
||||
return 0
|
||||
})
|
||||
if(resp === 0){
|
||||
return await stream(info.video_details.url)
|
||||
return await stream(info.video_details.url, cookie)
|
||||
}
|
||||
else if(typeof resp !== "number") resp.destroy()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user