Skip to content

Commit 73928b9

Browse files
committed
cleanup README
1 parent e360324 commit 73928b9

File tree

1 file changed

+47
-36
lines changed

1 file changed

+47
-36
lines changed

README.md

+47-36
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,26 @@ For all supported urls and queries see [here](#supported-urls-and-queries)
8585

8686
To get a Spotify clientId & clientSecret you must go [here](https://developer.spotify.com/dashboard) and create a new application.
8787

88+
<details>
89+
<summary>How to get sp dc cookie</summary>
90+
91+
1. Go to https://open.spotify.com
92+
2. Open DevTools and go to the Application tab
93+
3. Copy the value of the `sp_dc` cookie
94+
95+
</details>
96+
97+
8898
```java
8999
AudioPlayerManager playerManager = new DefaultAudioPlayerManager();
90100

91101
// create a new SpotifySourceManager with the default providers, clientId, clientSecret, spDc, countryCode and AudioPlayerManager and register it
102+
// spDc is only needed if you want to use it with LavaLyrics
92103
var spotify = new SpotifySourceManager(clientId, clientSecret, spDc, countryCode, () -> playerManager, DefaultMirroringAudioTrackResolver);
93104
playerManager.registerSourceManager(spotify);
94105
```
95106

96-
#### LavaLyrics
107+
##### LavaLyrics
97108
<details>
98109
<summary>Click to expand</summary>
99110

@@ -106,7 +117,7 @@ lyricsManager.registerLyricsManager(spotify);
106117
```
107118
</details>
108119

109-
#### LavaSearch
120+
##### LavaSearch
110121
<details>
111122
<summary>Click to expand</summary>
112123

@@ -120,16 +131,23 @@ searchManager.registerSearchManager(spotify);
120131

121132
</details>
122133

134+
---
135+
136+
#### Apple Music
137+
123138
<details>
124-
<summary>How to get sp dc cookie</summary>
139+
<summary>How to get media api token without Apple developer account</summary>
125140

126-
1. Go to https://open.spotify.com
127-
2. Open DevTools and go to the Application tab
128-
3. Copy the value of the `sp_dc` cookie
141+
1. Go to https://music.apple.com
142+
2. Open DevTools and go to the Debugger tab
143+
3. Search with this regex `"(?<token>(ey[\w-]+)\.([\w-]+)\.([\w-]+))"` in all `index-*.js` files
144+
4. Copy the token from the source code
129145

130146
</details>
131147

132-
#### Apple Music
148+
Alternatively, you can
149+
follow [this guide](https://developer.apple.com/help/account/configure-app-capabilities/create-a-media-identifier-and-private-key/)
150+
133151
```java
134152
AudioPlayerManager playerManager = new DefaultAudioPlayerManager();
135153

@@ -138,7 +156,8 @@ var appleMusic = new AppleMusicSourceManager(null, mediaAPIToken , "us", playerM
138156
playerManager.registerSourceManager(appleMusic);
139157
```
140158

141-
#### LavaSearch
159+
##### LavaSearch
160+
142161
<details>
143162
<summary>Click to expand</summary>
144163

@@ -151,46 +170,34 @@ searchManager.registerSearchManager(appleMusic);
151170
```
152171
</details>
153172

154-
<details>
155-
<summary>How to get media api token without Apple developer account</summary>
156-
157-
1. Go to https://music.apple.com
158-
2. Open DevTools and go to the Debugger tab
159-
3. Search with this regex `"(?<token>(ey[\w-]+)\.([\w-]+)\.([\w-]+))"` in all `index-*.js` files
160-
4. Copy the token from the source code
161-
162-
</details>
163-
164-
Alternatively, you can
165-
follow [this guide](https://developer.apple.com/help/account/configure-app-capabilities/create-a-media-identifier-and-private-key/)
173+
---
166174

167175
#### Deezer
168176

169-
```java
170-
AudioPlayerManager playerManager = new DefaultAudioPlayerManager();
171-
172-
// create a new DeezerSourceManager with the master decryption key and register it
173-
174-
var deezer = new DeezerSourceManager("the master decryption key", "your arl", formats);
175-
playerManager.registerSourceManager(deezer);
176-
```
177-
178177
<details>
179178
<summary>How to get deezer master decryption key</summary>
180179

181-
Use google.
180+
Use Google.
182181

183182
</details>
184183

185184
<details>
186185
<summary>How to get deezer arl cookie</summary>
187186

188-
Use google to find a guide on how to get the arl cookie. It's not that hard.
187+
Use Google to find a guide on how to get the arl cookie. It's not that hard.
189188

190189
</details>
191190

191+
```java
192+
AudioPlayerManager playerManager = new DefaultAudioPlayerManager();
193+
194+
// create a new DeezerSourceManager with the master decryption key and register it
192195

193-
#### LavaLyrics
196+
var deezer = new DeezerSourceManager("the master decryption key", "your arl", formats);
197+
playerManager.registerSourceManager(deezer);
198+
```
199+
200+
##### LavaLyrics
194201
<details>
195202
<summary>Click to expand</summary>
196203

@@ -203,7 +210,7 @@ lyricsManager.registerLyricsManager(deezer);
203210
```
204211
</details>
205212

206-
#### LavaSearch
213+
##### LavaSearch
207214
<details>
208215
<summary>Click to expand</summary>
209216

@@ -216,6 +223,8 @@ searchManager.registerSearchManager(deezer);
216223
```
217224
</details>
218225

226+
---
227+
219228
#### Yandex Music
220229

221230
<details>
@@ -256,7 +265,7 @@ var yandex = new YandexMusicSourceManager("...");
256265
playerManager.registerSourceManager(yandex);
257266
```
258267

259-
#### LavaLyrics
268+
##### LavaLyrics
260269
<details>
261270
<summary>Click to expand</summary>
262271

@@ -269,7 +278,7 @@ lyricsManager.registerLyricsManager(yandex);
269278
```
270279
</details>
271280

272-
#### LavaSearch
281+
##### LavaSearch
273282
<details>
274283
<summary>Click to expand</summary>
275284

@@ -282,6 +291,8 @@ searchManager.registerSearchManager(yandex);
282291
```
283292
</details>
284293

294+
---
295+
285296
#### Flowery Text-to-Speech
286297

287298
Get list of all voices and languages supported [here](https://api.flowery.pw/v1/tts/voices)
@@ -375,7 +386,7 @@ plugins:
375386
albumLoadLimit: 6 # The number of pages at 300 tracks each
376387
deezer:
377388
masterDecryptionKey: "your master decryption key" # the master key used for decrypting the deezer tracks. (yes this is not here you need to get it from somewhere else)
378-
arl: "your deezer arl" # the arl cookie used for accessing the deezer api
389+
# arl: "your deezer arl" # the arl cookie used for accessing the deezer api this is optional but required for formats above MP3_128
379390
formats: [ "FLAC", "MP3_320", "MP3_256", "MP3_128", "MP3_64", "AAC_64" ] # the formats you want to use for the deezer tracks. "FLAC", "MP3_320", "MP3_256" & "AAC_64" are only available for premium users and require a valid arl
380391
yandexmusic:
381392
accessToken: "your access token" # the token used for accessing the yandex music api. See https://github.com/TopiSenpai/LavaSrc#yandex-music

0 commit comments

Comments
 (0)