mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-31 14:58:05 +00:00
Spotify support added
This commit is contained in:
@@ -40,7 +40,7 @@ export async function stream(url : string, cookie? : string): Promise<Stream | L
|
||||
let final: any[] = [];
|
||||
let type : StreamType;
|
||||
if(info.LiveStreamData.isLive === true && info.LiveStreamData.hlsManifestUrl !== null && info.video_details.durationInSec === '0') {
|
||||
return live_stream(info as InfoData)
|
||||
return new LiveStreaming(info.LiveStreamData.dashManifestUrl, info.format[info.format.length - 1].targetDurationSec, info.video_details.url)
|
||||
}
|
||||
|
||||
let response = await got(info.format[info.format.length - 1].url, {
|
||||
@@ -76,7 +76,7 @@ export async function stream_from_info(info : InfoData): Promise<Stream | LiveSt
|
||||
let final: any[] = [];
|
||||
let type : StreamType;
|
||||
if(info.LiveStreamData.isLive === true && info.LiveStreamData.hlsManifestUrl !== null && info.video_details.durationInSec === '0') {
|
||||
return live_stream(info as InfoData)
|
||||
return new LiveStreaming(info.LiveStreamData.dashManifestUrl, info.format[info.format.length - 1].targetDurationSec, info.video_details.url)
|
||||
}
|
||||
|
||||
let response = await got(info.format[info.format.length - 1].url, {
|
||||
@@ -115,8 +115,3 @@ function filterFormat(formats : any[], codec : string){
|
||||
})
|
||||
return result
|
||||
}
|
||||
|
||||
function live_stream(info : InfoData): LiveStreaming{
|
||||
let stream = new LiveStreaming(info.LiveStreamData.dashManifestUrl, info.format[info.format.length - 1].targetDurationSec, info.video_details.url)
|
||||
return stream
|
||||
}
|
||||
Reference in New Issue
Block a user