From fd0450bf18e1a2132478e8a24a76b730a566df37 Mon Sep 17 00:00:00 2001 From: watchdogsrox Date: Thu, 29 Apr 2021 04:49:31 -0400 Subject: [PATCH] Update Player.ts --- src/Player.ts | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/Player.ts b/src/Player.ts index cf067b5..e204c87 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -182,7 +182,6 @@ export class Player extends EventEmitter { const playlist = await spotify.getData(query); if (!playlist) return void this.emit(PlayerEvents.NO_RESULTS, message, query); - //Much faster loading const tracks = await Promise.all(playlist.tracks.items.map(async (track) => { const sq = queryType === 'spotify_album' @@ -198,24 +197,6 @@ export class Player extends EventEmitter { return results[0]; })); -// // tslint:disable:no-shadowed-variable -// const tracks = []; - -// for (const item of playlist.tracks.items) { -// const sq = -// queryType === 'spotify_album' -// ? `${item.artists[0].name} - ${item.name}` -// : `${item.track.artists[0].name} - ${item.name}`; -// const data = await Util.ytSearch(sq, { -// limit: 1, -// player: this, -// user: message.author, -// pl: true -// }); - -// if (data[0]) tracks.push(data[0]); -// } - if (!tracks.length) return void this.emit(PlayerEvents.NO_RESULTS, message, query); const pl = {