discord-player-deezer 2.0.0-dev.2 → 2.0.0-dev.4

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -134,10 +134,16 @@ async function streamTrack(track, ext) {
134
134
  }]
135
135
  }],
136
136
  track_tokens: [info.TRACK_TOKEN]
137
- })
137
+ }),
138
+ headers: {
139
+ "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0",
140
+ "Content-Type": "application/json"
141
+ }
138
142
  });
143
+ ext.context.player.debug(await streamInfoRes.text());
139
144
  const streamInfo = await streamInfoRes.json();
140
145
  const trackMediaUrl = streamInfo.data[0].media[0].sources[0].url;
146
+ ext.context.player.debug("DEEZER FOUND MEDIA URL " + trackMediaUrl);
141
147
  const trackReq = await fetch(trackMediaUrl);
142
148
  const readable = import_stream.Readable.fromWeb(trackReq.body);
143
149
  let buffer = Buffer.alloc(0);
@@ -206,6 +212,7 @@ var DeezerExtractor = class extends import_discord_player2.BaseExtractor {
206
212
  licenseToken,
207
213
  csrfToken
208
214
  };
215
+ this.context.player.debug("USER INFO EXT: " + JSON.stringify(this.userInfo));
209
216
  }
210
217
  }
211
218
  async validate(query) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "discord-player-deezer",
3
- "version": "2.0.0-dev.2",
3
+ "version": "2.0.0-dev.4",
4
4
  "description": "A custom extractor made for discord-player that enables you to extract from Deezer.",
5
5
  "main": "dist/index.js",
6
6
  "author": "retro_ig",