diff --git a/src/Player.ts b/src/Player.ts index bc77831..25e6098 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -467,8 +467,8 @@ class Player extends EventEmitter { const track = new Track(this, { title: song.name, description: "", - author: song.publisher.name ?? "Unknown Publisher", - url: song.url, + author: song.publisher?.name ?? "Unknown", + url: song.permalink, thumbnail: song.thumbnail, duration: Util.buildTimeCode(Util.parseMS(song.durationInMs)), views: 0, diff --git a/src/Structures/Queue.ts b/src/Structures/Queue.ts index 1facbd6..d4be698 100644 --- a/src/Structures/Queue.ts +++ b/src/Structures/Queue.ts @@ -630,7 +630,7 @@ class Queue { let stream = null; const hasCustomDownloader = typeof this.onBeforeCreateStream === "function"; - if (["youtube", "spotify"].includes(track.raw.source)) { + if (["youtube", "spotify", "soundcloud"].includes(track.raw.source)) { const url = track.raw.source === "spotify" ? track.raw.engine : track.url; if (!url) return void this.play(this.tracks.shift(), { immediate: true }); @@ -644,7 +644,7 @@ class Queue { } else { const arbitraryStream = (hasCustomDownloader && (await this.onBeforeCreateStream(track, track.raw.source || track.raw.engine, this))) || null; stream = - arbitraryStream || (track.raw.source === "soundcloud" && typeof track.raw.engine?.downloadProgressive === "function") + arbitraryStream ? await track.raw.engine.downloadProgressive() : typeof track.raw.engine === "function" ? await track.raw.engine()