fix spotify playlist list

This commit is contained in:
Snowflake107 2021-05-10 14:28:23 +05:45
parent 4d0fa222b2
commit de40d183a6

View file

@ -207,7 +207,7 @@ export class Player extends EventEmitter {
if (!playlist) return void this.emit(PlayerEvents.NO_RESULTS, message, query);
// tslint:disable-next-line:no-shadowed-variable
const tracks = await Promise.all<Track>(
let tracks = await Promise.all<Track>(
playlist.tracks.items.map(async (item: any) => {
const sq =
queryType === 'spotify_album'
@ -232,7 +232,8 @@ export class Player extends EventEmitter {
if (data.length) return data[0];
})
);
tracks = tracks.filter(f => !!f);
if (!tracks.length) return void this.emit(PlayerEvents.NO_RESULTS, message, query);
const pl = {