music: fix search results returning youtu.be still

This commit is contained in:
Cynthia Foxwell 2023-09-12 22:34:46 -06:00
parent a75cb21c8e
commit 72133d4fa7

View file

@ -399,7 +399,7 @@ async function youtubeSearch(msg, str) {
).then((x) => x.json()); ).then((x) => x.json());
const selection = items.map((item) => ({ const selection = items.map((item) => ({
value: "https://youtu.be" + item.url, value: "https://youtube.com" + item.url,
key: item.url.replace("/watch?v=", ""), key: item.url.replace("/watch?v=", ""),
display: `${parseHtmlEntities(item.title).substring(0, 99)}${ display: `${parseHtmlEntities(item.title).substring(0, 99)}${
parseHtmlEntities(item.title).length > 99 ? "…" : "" parseHtmlEntities(item.title).length > 99 ? "…" : ""