diff --git a/src/Player.ts b/src/Player.ts index 0676862..8221bb6 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -209,18 +209,19 @@ export class Player extends EventEmitter { // tslint:disable-next-line:no-shadowed-variable const tracks = await Promise.all( 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,