renamed m3u function to m3u8
This commit is contained in:
parent
b9212f3b98
commit
40680506ae
4
index.js
4
index.js
|
@ -92,7 +92,7 @@ async function handler(type, request) {
|
||||||
return await track(id, format, access_token)
|
return await track(id, format, access_token)
|
||||||
case 'album':
|
case 'album':
|
||||||
case 'playlist':
|
case 'playlist':
|
||||||
return await m3u(type, id, format, access_token)
|
return await m3u8(type, id, format, access_token)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ async function track_url(json, format) {
|
||||||
return await url_gen(md5_origin, format, id, media_version)
|
return await url_gen(md5_origin, format, id, media_version)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function m3u(type, id, format, access_token) {
|
async function m3u8(type, id, format, access_token) {
|
||||||
const response = await fetch(`https://api.deezer.com/${type}/${id}?access_token=${access_token}&limit=-1`)
|
const response = await fetch(`https://api.deezer.com/${type}/${id}?access_token=${access_token}&limit=-1`)
|
||||||
const json = await response.json()
|
const json = await response.json()
|
||||||
if (json.error !== undefined) {
|
if (json.error !== undefined) {
|
||||||
|
|
Loading…
Reference in New Issue