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
1 changed files with 5 additions and 1 deletions

View File

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