diff --git a/src/apis/TuneIn.js b/src/apis/TuneIn.js index b941bb9..025392f 100644 --- a/src/apis/TuneIn.js +++ b/src/apis/TuneIn.js @@ -4,7 +4,7 @@ const API_URL = 'https://opml.radiotime.com' class TuneInAPI { static get (id) { - return this.request('/Tune.ashx', { id }).then(({ body: [ result ]}) => result) + return this.request('/Tune.ashx', { id }).then(({ body: [result] }) => result) } // Internal diff --git a/src/apis/Youtube.js b/src/apis/Youtube.js index eecfcbf..be64b11 100644 --- a/src/apis/Youtube.js +++ b/src/apis/Youtube.js @@ -45,7 +45,7 @@ class YoutubeAPI { static getBestThumbnail (thumbnails) { if (!thumbnails) return {} - return [ 'maxres', 'high', 'medium', 'standard', 'default' ].find(q => thumbnails[q]) + return ['maxres', 'high', 'medium', 'standard', 'default'].find(q => thumbnails[q]) } // Internal diff --git a/src/apis/YoutubeMusic.js b/src/apis/YoutubeMusic.js index d781884..f85c39a 100644 --- a/src/apis/YoutubeMusic.js +++ b/src/apis/YoutubeMusic.js @@ -74,7 +74,7 @@ class YoutubeMusicAPI { // Internal static async request (endpoint, body) { - const [ key, name, version ] = await this.getKeys() + const [key, name, version] = await this.getKeys() const qParams = new URLSearchParams({ key, alt: 'json' }) return fetch(API_URL + endpoint + `?${qParams.toString()}`, { method: 'POST', @@ -102,8 +102,8 @@ class YoutubeMusicAPI { const [, key] = /INNERTUBE_API_KEY":"([0-9a-zA-Z_-]+?)"/ig.exec(body) const [, clientName] = /INNERTUBE_CONTEXT_CLIENT_NAME":([0-9]+?),/ig.exec(body) const [, clientVersion] = /INNERTUBE_CONTEXT_CLIENT_VERSION":"([0-9\\.]+?)"/ig.exec(body) || /INNERTUBE_CONTEXT_CLIENT_VERSION":"([0-9.]+?)"/ig.exec(body) - - this.keys = [ key, clientName, clientVersion ] + + this.keys = [key, clientName, clientVersion] return this.keys } diff --git a/src/structures/providers/SongProvider.js b/src/structures/providers/SongProvider.js index 23ee0eb..ecc7f36 100644 --- a/src/structures/providers/SongProvider.js +++ b/src/structures/providers/SongProvider.js @@ -49,7 +49,7 @@ class SongProvider { } return new Playlist(tracks.map(({ track, info }) => new Song(track, info)), playlistInfo, this) } else if (tracks.length) { - const [ { track, info } ] = tracks + const [{ track, info }] = tracks return new Song(track, info) } }) diff --git a/src/structures/providers/spotify/SpotifyProvider.js b/src/structures/providers/spotify/SpotifyProvider.js index 032be8c..ccf1e39 100644 --- a/src/structures/providers/spotify/SpotifyProvider.js +++ b/src/structures/providers/spotify/SpotifyProvider.js @@ -19,12 +19,12 @@ const PLAYLIST_REGEX = [ class SpotifyProvider { static get (provider, identifier) { return Promise.all([ - this.getTrack, - this.getAlbum, - this.getPlaylist - ] - .map(f => f(provider, identifier))) - .then(r => r.find(v => v)) // Find a valid match + this.getTrack, + this.getAlbum, + this.getPlaylist + ] + .map(f => f(provider, identifier))) + .then(r => r.find(v => v)) // Find a valid match } static async getTrack (provider, identifier) {