This commit is contained in:
JonnyBro 2023-02-22 13:48:29 +05:00
parent ca53b6da0c
commit 241a22b5d1

View file

@ -628,11 +628,11 @@ class Queue<T = unknown> {
const hasCustomDownloader = typeof this.onBeforeCreateStream === "function";
if (["youtube", "spotify", "soundcloud"].includes(track.raw.source)) {
let spotifyResolved = false;
if (track.raw.source === "spotify" && !track.raw.engine) {
track.raw.engine = await play.search(`${track.author} ${track.title}`, { limit: 5 })
.then(res => res[0].url)
track.raw.engine = await play
.search(`${track.author} ${track.title}`, { limit: 5 })
.then((res) => res[0].url)
.catch(Util.noop);
spotifyResolved = true;
}