fixed format for user-upped tracks in m3u8 playlists

This commit is contained in:
uh wot 2021-06-21 17:30:57 +02:00
parent e41d3d37a3
commit b357840761
Signed by: uhwot
GPG Key ID: CB2454984587B781
2 changed files with 5 additions and 2 deletions

2
dist/worker.js vendored

File diff suppressed because one or more lines are too long

View File

@ -183,7 +183,7 @@ async function track_url(json, format) {
const md5_origin = json.md5_origin
const media_version = json.media_version
if (id < 0) {
if (id < 0) { // user-uploaded track
format = 'misc'
}
@ -213,6 +213,9 @@ async function m3u8(type, id, format, access_token, tagging) {
return result
}
} else {
if (track.id < 0) { // user-uploaded track
format = 'misc'
}
result = `https://dz.uhwot.workers.dev/track/${track.id}?f=${format}&t=1`
}
list += `#EXTINF:${track.duration},${track.title}\n${result}\n`