changed tagging param parsing

This commit is contained in:
uh wot 2021-06-07 12:32:12 +02:00
parent cedcae8900
commit e41d3d37a3
Signed by: uhwot
GPG Key ID: CB2454984587B781
2 changed files with 5 additions and 4 deletions

2
dist/worker.js vendored

File diff suppressed because one or more lines are too long

View File

@ -84,7 +84,8 @@ async function handler(type, request) {
} }
} }
tagging = (url.searchParams.get('t') === 'true') && ((format === '128') || (format === '320') || (format === 'misc')) var tagging = url.searchParams.get('t')
tagging = (tagging === 'true' || tagging === '1') && format !== 'flac'
switch (type) { switch (type) {
case 'track': case 'track':
@ -212,7 +213,7 @@ async function m3u8(type, id, format, access_token, tagging) {
return result return result
} }
} else { } else {
result = `https://dz.uhwot.workers.dev/track/${track.id}?f=${format}&t=true` 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`
} }