music: try prefetching before sending to voice
This commit is contained in:
parent
58ae0b999d
commit
d0a8e20bb3
1 changed files with 3 additions and 1 deletions
|
@ -230,7 +230,9 @@ async function enqueue({
|
||||||
length = info?.duration * 1000;
|
length = info?.duration * 1000;
|
||||||
thumbnail = info?.thumbnailUrl;
|
thumbnail = info?.thumbnailUrl;
|
||||||
|
|
||||||
media = info?.hls;
|
media = await fetch(
|
||||||
|
info?.audioStreams?.sort((a, b) => a.bitrate - b.bitrate)?.[0]?.url
|
||||||
|
).then((res) => res.body());
|
||||||
} else if (type == "sc") {
|
} else if (type == "sc") {
|
||||||
if (url?.startsWith("sc:"))
|
if (url?.startsWith("sc:"))
|
||||||
url = url.replace(/^sc:/, "https://soundcloud.com/");
|
url = url.replace(/^sc:/, "https://soundcloud.com/");
|
||||||
|
|
Loading…
Reference in a new issue