music: fix urls, fix ffmpeg protocol whitelist

This commit is contained in:
Cynthia Foxwell 2023-09-28 21:44:56 -06:00
parent cd7d7b3c36
commit 554385fa01

View file

@ -237,7 +237,10 @@ async function enqueue({
await fetch(info.hls) await fetch(info.hls)
.then((res) => res.text()) .then((res) => res.text())
.then((data) => .then((data) =>
data.replaceAll("/api/manifest/", `https://${hlsUrl.hostname}$1`) data.replaceAll(
"/api/manifest/",
`https://${hlsUrl.hostname}/api/manifest/`
)
) )
); );
} else if (type == "sc") { } else if (type == "sc") {
@ -355,6 +358,7 @@ async function enqueue({
await connection.connection.play(media, { await connection.connection.play(media, {
inlineVolume: true, inlineVolume: true,
voiceDataTimeout: -1, voiceDataTimeout: -1,
inputArgs: ["-protocol_whitelist", "file,http,https,tcp,tls"],
}); });
textChannel.createMessage({ textChannel.createMessage({