discord-player-deezer 2.0.0-dev.7 → 2.0.0-dev.9
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 +18 -27
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -109,37 +109,28 @@ async function streamTrack(track, ext) {
|
|
|
109
109
|
sng_ids: [trackId]
|
|
110
110
|
})
|
|
111
111
|
});
|
|
112
|
-
const
|
|
113
|
-
const info = trackInfo.results.data[0];
|
|
114
|
-
ext.context.player.debug(`ATTEMPTING TO EXTRACT STREAM WITH { licenseToken: ${ext.userInfo.licenseToken}, trackToken: ${info.TRACK_TOKEN} }`);
|
|
112
|
+
const songInfo = (await trackInfoRes.json()).results.data[0];
|
|
115
113
|
const streamInfoRes = await fetch("https://media.deezer.com/v1/get_url", {
|
|
116
114
|
method: "POST",
|
|
117
115
|
body: JSON.stringify({
|
|
118
116
|
license_token: ext.userInfo.licenseToken,
|
|
119
|
-
media: [
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
cipher: "BF_CBC_STRIPE",
|
|
137
|
-
format: "MP3_MISC"
|
|
138
|
-
}
|
|
139
|
-
]
|
|
140
|
-
}
|
|
141
|
-
],
|
|
142
|
-
track_tokens: [info.TRACK_TOKEN]
|
|
117
|
+
media: [{
|
|
118
|
+
type: "FULL",
|
|
119
|
+
formats: [{
|
|
120
|
+
cipher: "BF_CBC_STRIPE",
|
|
121
|
+
format: "FLAC"
|
|
122
|
+
}, {
|
|
123
|
+
cipher: "BF_CBC_STRIPE",
|
|
124
|
+
format: "MP3_256"
|
|
125
|
+
}, {
|
|
126
|
+
cipher: "BF_CBC_STRIPE",
|
|
127
|
+
format: "MP3_128"
|
|
128
|
+
}, {
|
|
129
|
+
cipher: "BF_CBC_STRIPE",
|
|
130
|
+
format: "MP3_MISC"
|
|
131
|
+
}]
|
|
132
|
+
}],
|
|
133
|
+
track_tokens: [songInfo.TRACK_TOKEN]
|
|
143
134
|
})
|
|
144
135
|
});
|
|
145
136
|
const streamInfo = await streamInfoRes.json();
|
package/package.json
CHANGED