discord-player-deezer 2.0.0-dev.0 → 2.0.0-dev.2
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 +1 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -112,7 +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];
|
|
115
|
+
const info = trackInfo.results.data[0];
|
|
116
116
|
const streamInfoRes = await fetch(`${ext.userInfo.mediaUrl}/v1/get-url`, {
|
|
117
117
|
method: "POST",
|
|
118
118
|
body: JSON.stringify({
|
|
@@ -251,10 +251,8 @@ var DeezerExtractor = class extends import_discord_player2.BaseExtractor {
|
|
|
251
251
|
}
|
|
252
252
|
async bridge(track) {
|
|
253
253
|
const deezerTrack = await searchOneTrack(`${track.author} ${track.source === "youtube" ? track.cleanTitle : track.title}`);
|
|
254
|
-
console.log(deezerTrack);
|
|
255
254
|
if (!deezerTrack) return null;
|
|
256
255
|
const dpTrack = buildTrackFromSearch(deezerTrack, this.context.player, track.requestedBy);
|
|
257
|
-
console.log(dpTrack);
|
|
258
256
|
const stream = this.stream(dpTrack[0]);
|
|
259
257
|
return stream;
|
|
260
258
|
}
|
package/package.json
CHANGED