fixed format for user-upped tracks in m3u8 playlists
This commit is contained in:
parent
e41d3d37a3
commit
b357840761
File diff suppressed because one or more lines are too long
5
index.js
5
index.js
|
@ -183,7 +183,7 @@ async function track_url(json, format) {
|
||||||
const md5_origin = json.md5_origin
|
const md5_origin = json.md5_origin
|
||||||
const media_version = json.media_version
|
const media_version = json.media_version
|
||||||
|
|
||||||
if (id < 0) {
|
if (id < 0) { // user-uploaded track
|
||||||
format = 'misc'
|
format = 'misc'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,6 +213,9 @@ async function m3u8(type, id, format, access_token, tagging) {
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (track.id < 0) { // user-uploaded track
|
||||||
|
format = 'misc'
|
||||||
|
}
|
||||||
result = `https://dz.uhwot.workers.dev/track/${track.id}?f=${format}&t=1`
|
result = `https://dz.uhwot.workers.dev/track/${track.id}?f=${format}&t=1`
|
||||||
}
|
}
|
||||||
list += `#EXTINF:${track.duration},${track.title}\n${result}\n`
|
list += `#EXTINF:${track.duration},${track.title}\n${result}\n`
|
||||||
|
|
Loading…
Reference in New Issue