From 4ac2fecc8cc41076cc12bfda5779bc191c77c2c7 Mon Sep 17 00:00:00 2001 From: DynamoYT <63182360+DynamoYT@users.noreply.github.com> Date: Tue, 23 Feb 2021 10:50:47 +0530 Subject: [PATCH 1/2] Update Resolver.js Now it will return Spotify URLs, titles, and artists name. --- dist/structures/Resolver.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/structures/Resolver.js b/dist/structures/Resolver.js index 46d4dcf..e23d7a9 100644 --- a/dist/structures/Resolver.js +++ b/dist/structures/Resolver.js @@ -112,7 +112,11 @@ class Resolver { const { body } = yield node_superfetch_1.default .get(`http://${this.node.options.host}:${this.node.options.port}/loadtracks?${params}`) .set("Authorization", this.node.options.password); + if (body.tracks.length) + body.tracks[0].info.title = track.name; + body.tracks[0].info.author = track.artists.map(spotify => spotify.name).join(", "); + body.tracks[0].info.uri = track.external_urls.spotify; this.cache.set(track.id, Object.freeze(body.tracks[0])); return Util_1.default.structuredClone(body.tracks[0]); } @@ -123,4 +127,4 @@ class Resolver { } } exports.default = Resolver; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVzb2x2ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc3RydWN0dXJlcy9SZXNvbHZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztBQUNBLHNFQUFzQztBQUV0QyxtREFBMkI7QUFFM0IsTUFBcUIsUUFBUTtJQUl6QixZQUEwQixJQUFVO1FBQVYsU0FBSSxHQUFKLElBQUksQ0FBTTtRQUg3QixXQUFNLEdBQUcsSUFBSSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUM7UUFDMUIsVUFBSyxHQUFHLElBQUksR0FBRyxFQUF5QixDQUFDO0lBRVQsQ0FBQztJQUV4QyxJQUFXLEtBQUs7UUFDWixPQUFPLElBQUksQ0FBQyxNQUFNLENBQUMsS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 From 0d18dec7b5df4345a0702bf1073ba13af5e58c61 Mon Sep 17 00:00:00 2001 From: DynamoYT <63182360+DynamoYT@users.noreply.github.com> Date: Sat, 3 Apr 2021 22:34:54 +0530 Subject: [PATCH 2/2] Update Resolver.ts --- src/structures/Resolver.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/structures/Resolver.ts b/src/structures/Resolver.ts index b43ad8f..86fa3e8 100644 --- a/src/structures/Resolver.ts +++ b/src/structures/Resolver.ts @@ -111,7 +111,11 @@ export default class Resolver { .get(`http://${this.node.options.host}:${this.node.options.port}/loadtracks?${params}`) .set("Authorization", this.node.options.password); - if (body.tracks.length) this.cache.set(track.id, Object.freeze(body.tracks[0])); + if (body.tracks.length) + body.tracks[0].info.title = track.name; + body.tracks[0].info.author = track.artists.map(spotify => spotify.name).join(", "); + body.tracks[0].info.uri = track.external_urls.spotify; + this.cache.set(track.id, Object.freeze(body.tracks[0])); return Util.structuredClone(body.tracks[0]); } catch {