spotify playlists data
This commit is contained in:
parent
c6830f87c0
commit
29b54029e6
1 changed files with 3 additions and 1 deletions
|
@ -240,7 +240,8 @@ export class Player extends EventEmitter {
|
||||||
...playlist,
|
...playlist,
|
||||||
tracks,
|
tracks,
|
||||||
duration: tracks?.reduce((a, c) => a + (c?.durationMS ?? 0), 0) ?? 0,
|
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);
|
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)
|
(e) => void this.emit(PlayerEvents.ERROR, e, message)
|
||||||
)) as Queue;
|
)) as Queue;
|
||||||
this.emit(PlayerEvents.TRACK_START, message, queue.tracks[0], queue);
|
this.emit(PlayerEvents.TRACK_START, message, queue.tracks[0], queue);
|
||||||
|
this.emit(PlayerEvents.PLAYLIST_ADD, message, queue, pl);
|
||||||
this._addTracksToQueue(message, tracks);
|
this._addTracksToQueue(message, tracks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue