From 29b54029e6d4816f7dc6ab85c8b5e3bc1363f186 Mon Sep 17 00:00:00 2001 From: Snowflake107 Date: Mon, 10 May 2021 15:44:05 +0545 Subject: [PATCH] spotify playlists data --- src/Player.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Player.ts b/src/Player.ts index 44f44f2..1a8d84e 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -240,7 +240,8 @@ export class Player extends EventEmitter { ...playlist, tracks, duration: tracks?.reduce((a, c) => a + (c?.durationMS ?? 0), 0) ?? 0, - thumbnail: playlist.images[0]?.url ?? tracks[0].thumbnail + thumbnail: playlist.images[0]?.url ?? tracks[0].thumbnail, + title: playlist.title ?? playlist.name ?? "" }; this.emit(PlayerEvents.PLAYLIST_PARSE_END, pl, message); @@ -254,6 +255,7 @@ export class Player extends EventEmitter { (e) => void this.emit(PlayerEvents.ERROR, e, message) )) as Queue; this.emit(PlayerEvents.TRACK_START, message, queue.tracks[0], queue); + this.emit(PlayerEvents.PLAYLIST_ADD, message, queue, pl); this._addTracksToQueue(message, tracks); }