discord-player-deezer 2.0.0-dev.1 → 2.0.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -112,8 +112,7 @@ async function streamTrack(track, ext) {
|
|
|
112
112
|
const trackInfo = await trackInfoRes.json();
|
|
113
113
|
if (Array.isArray(trackInfo.error) && trackInfo.error.length !== 0) throw new Error("Unable to extract track\n" + JSON.stringify(trackInfo.error));
|
|
114
114
|
if (typeof trackInfo.error === "object" && Object.keys(trackInfo.error).length !== 0) throw new Error("Unable to extract track\n" + JSON.stringify(trackInfo.error));
|
|
115
|
-
const info = trackInfo.data[0];
|
|
116
|
-
console.log(info);
|
|
115
|
+
const info = trackInfo.results.data[0];
|
|
117
116
|
const streamInfoRes = await fetch(`${ext.userInfo.mediaUrl}/v1/get-url`, {
|
|
118
117
|
method: "POST",
|
|
119
118
|
body: JSON.stringify({
|
|
@@ -139,6 +138,7 @@ async function streamTrack(track, ext) {
|
|
|
139
138
|
});
|
|
140
139
|
const streamInfo = await streamInfoRes.json();
|
|
141
140
|
const trackMediaUrl = streamInfo.data[0].media[0].sources[0].url;
|
|
141
|
+
ext.context.player.debug("DEEZER FOUND MEDIA URL " + trackMediaUrl);
|
|
142
142
|
const trackReq = await fetch(trackMediaUrl);
|
|
143
143
|
const readable = import_stream.Readable.fromWeb(trackReq.body);
|
|
144
144
|
let buffer = Buffer.alloc(0);
|
|
@@ -207,6 +207,7 @@ var DeezerExtractor = class extends import_discord_player2.BaseExtractor {
|
|
|
207
207
|
licenseToken,
|
|
208
208
|
csrfToken
|
|
209
209
|
};
|
|
210
|
+
this.context.player.debug("USER INFO EXT: " + JSON.stringify(this.userInfo));
|
|
210
211
|
}
|
|
211
212
|
}
|
|
212
213
|
async validate(query) {
|
package/package.json
CHANGED