Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
[shouldFetchCurrent ? trackCurrent : {}, ...tracksToRight, ...tracksToLeft].map((item, index) => {
if (item.videoId && ytdl.validateID(item.videoId)) {
this._ytdlGetInfo(
item.videoId,
info => {
console.log(JSON.stringify(info));
const highestQualityAudio = this._filterHighestQualityAudio(info.formats);
this._updateTrackPlayerQueueItem(
tracks,
item,
{
url: highestQualityAudio,
title: info.title,
artist: info.author.name,
artwork: info.thumbnail_url,
},