Skip to content

Commit

Permalink
cleanup README
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Aug 20, 2024
1 parent e360324 commit 73928b9
Showing 1 changed file with 47 additions and 36 deletions.
83 changes: 47 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,26 @@ For all supported urls and queries see [here](#supported-urls-and-queries)

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

<details>
<summary>How to get sp dc cookie</summary>

1. Go to https://open.spotify.com
2. Open DevTools and go to the Application tab
3. Copy the value of the `sp_dc` cookie

</details>


```java
AudioPlayerManager playerManager = new DefaultAudioPlayerManager();

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

#### LavaLyrics
##### LavaLyrics
<details>
<summary>Click to expand</summary>

Expand All @@ -106,7 +117,7 @@ lyricsManager.registerLyricsManager(spotify);
```
</details>

#### LavaSearch
##### LavaSearch
<details>
<summary>Click to expand</summary>

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

</details>

---

#### Apple Music

<details>
<summary>How to get sp dc cookie</summary>
<summary>How to get media api token without Apple developer account</summary>

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

</details>

#### Apple Music
Alternatively, you can
follow [this guide](https://developer.apple.com/help/account/configure-app-capabilities/create-a-media-identifier-and-private-key/)

```java
AudioPlayerManager playerManager = new DefaultAudioPlayerManager();

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

#### LavaSearch
##### LavaSearch

<details>
<summary>Click to expand</summary>

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

<details>
<summary>How to get media api token without Apple developer account</summary>

1. Go to https://music.apple.com
2. Open DevTools and go to the Debugger tab
3. Search with this regex `"(?<token>(ey[\w-]+)\.([\w-]+)\.([\w-]+))"` in all `index-*.js` files
4. Copy the token from the source code

</details>

Alternatively, you can
follow [this guide](https://developer.apple.com/help/account/configure-app-capabilities/create-a-media-identifier-and-private-key/)
---

#### Deezer

```java
AudioPlayerManager playerManager = new DefaultAudioPlayerManager();

// create a new DeezerSourceManager with the master decryption key and register it

var deezer = new DeezerSourceManager("the master decryption key", "your arl", formats);
playerManager.registerSourceManager(deezer);
```

<details>
<summary>How to get deezer master decryption key</summary>

Use google.
Use Google.

</details>

<details>
<summary>How to get deezer arl cookie</summary>

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

</details>

```java
AudioPlayerManager playerManager = new DefaultAudioPlayerManager();

// create a new DeezerSourceManager with the master decryption key and register it

#### LavaLyrics
var deezer = new DeezerSourceManager("the master decryption key", "your arl", formats);
playerManager.registerSourceManager(deezer);
```

##### LavaLyrics
<details>
<summary>Click to expand</summary>

Expand All @@ -203,7 +210,7 @@ lyricsManager.registerLyricsManager(deezer);
```
</details>

#### LavaSearch
##### LavaSearch
<details>
<summary>Click to expand</summary>

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

---

#### Yandex Music

<details>
Expand Down Expand Up @@ -256,7 +265,7 @@ var yandex = new YandexMusicSourceManager("...");
playerManager.registerSourceManager(yandex);
```

#### LavaLyrics
##### LavaLyrics
<details>
<summary>Click to expand</summary>

Expand All @@ -269,7 +278,7 @@ lyricsManager.registerLyricsManager(yandex);
```
</details>

#### LavaSearch
##### LavaSearch
<details>
<summary>Click to expand</summary>

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

---

#### Flowery Text-to-Speech

Get list of all voices and languages supported [here](https://api.flowery.pw/v1/tts/voices)
Expand Down Expand Up @@ -375,7 +386,7 @@ plugins:
albumLoadLimit: 6 # The number of pages at 300 tracks each
deezer:
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)
arl: "your deezer arl" # the arl cookie used for accessing the deezer api
# arl: "your deezer arl" # the arl cookie used for accessing the deezer api this is optional but required for formats above MP3_128
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
yandexmusic:
accessToken: "your access token" # the token used for accessing the yandex music api. See https://github.com/TopiSenpai/LavaSrc#yandex-music
Expand Down

0 comments on commit 73928b9

Please sign in to comment.