fix spotify track name

This commit is contained in:
Snowflake107 2021-05-10 13:49:30 +05:45
parent d5e29d7cdd
commit 5386bbc914

View file

@ -209,18 +209,19 @@ export class Player extends EventEmitter {
// tslint:disable-next-line:no-shadowed-variable
const tracks = await Promise.all<Track>(
playlist.tracks.items.map(async (item: any) => {
const sq =
queryType === 'spotify_album'
? `${
this.options.disableArtistSearch
? item.artists[0].name
: `${item.artists[0].name} - `
}${item.name}`
}${item.name ?? item.track.name}`
: `${
this.options.disableArtistSearch
? item.track.artists[0].name
: `${item.track.artists[0].name} - `
}${item.name}`;
}${item.name ?? item.track.name}`;
const data = await Util.ytSearch(sq, {
limit: 1,