fix spotify playlist list
This commit is contained in:
parent
4d0fa222b2
commit
de40d183a6
1 changed files with 3 additions and 2 deletions
|
@ -207,7 +207,7 @@ export class Player extends EventEmitter {
|
||||||
if (!playlist) return void this.emit(PlayerEvents.NO_RESULTS, message, query);
|
if (!playlist) return void this.emit(PlayerEvents.NO_RESULTS, message, query);
|
||||||
|
|
||||||
// tslint:disable-next-line:no-shadowed-variable
|
// 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) => {
|
playlist.tracks.items.map(async (item: any) => {
|
||||||
const sq =
|
const sq =
|
||||||
queryType === 'spotify_album'
|
queryType === 'spotify_album'
|
||||||
|
@ -232,7 +232,8 @@ export class Player extends EventEmitter {
|
||||||
if (data.length) return data[0];
|
if (data.length) return data[0];
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
tracks = tracks.filter(f => !!f);
|
||||||
if (!tracks.length) return void this.emit(PlayerEvents.NO_RESULTS, message, query);
|
if (!tracks.length) return void this.emit(PlayerEvents.NO_RESULTS, message, query);
|
||||||
|
|
||||||
const pl = {
|
const pl = {
|
||||||
|
|
Loading…
Reference in a new issue