Skip to content

Commit b102279

Browse files
authored
Merge pull request #49 from bongodevs/dev
Dev
2 parents 229aebc + b40f483 commit b102279

54 files changed

Lines changed: 2293 additions & 2820 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ jobs:
257257
{
258258
"username": "${{ github.event.repository.name }}",
259259
"avatar_url": "https://github.com/${{ github.repository_owner }}.png",
260+
"content": "<@&942119976825946143>",
260261
"embeds": [
261262
{
262263
"author": {

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ docs/.vitepress/dist/
2424
docs/.vitepress/cache/
2525

2626

27+
QWEN.md

config.example.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ enabled = true
6868
get_oauth_token = false
6969

7070
[sources.youtube.clients]
71-
search = ["TVHTML5_SIMPLY", "MUSIC_ANDROID", "MUSIC_WEB", "ANDROID", "WEB"]
72-
playback = ["ANDROID_VR", "TV_CAST", "WEB_EMBEDDED", "TV", "WEB", "IOS"]
73-
resolve = ["TVHTML5_SIMPLY", "TVHTML5_UNPLUGGED", "WEB", "IOS", "MUSIC_WEB", "ANDROID"]
71+
search = ["TVHTML5_SIMPLY", "MUSIC_ANDROID", "ANDROID", "WEB"]
72+
playback = ["ANDROID_VR", "TV_CAST", "WEB_EMBEDDED", "TV", "WEB", "IOS", "MWEB"]
73+
resolve = ["TVHTML5_SIMPLY", "TVHTML5_UNPLUGGED", "WEB", "MWEB", "IOS", "ANDROID"]
7474

7575
[sources.youtube.cipher]
7676
url = "https://cipher.kikkia.dev/"

docs/astro.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export default defineConfig({
3636
{ label: 'Introduction', slug: 'introduction' },
3737
{ label: 'Installation', slug: 'installation' },
3838
{ label: 'Configuration', slug: 'configuration' },
39+
{ label: 'Sources', slug: 'sources' },
3940
{ label: 'Docker', slug: 'docker' },
4041
{ label: 'Pterodactyl', slug: 'pterodactyl' },
4142
{ label: 'Troubleshooting', slug: 'troubleshooting' },

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"@astrojs/starlight": "^0.38.1",
1616
"astro": "^6.0.1",
1717
"astro-mermaid": "^1.3.1",
18+
"mermaid": "^11.13.0",
1819
"sharp": "^0.34.2",
1920
"typescript": "^5.9.3"
2021
}

docs/src/content/docs/sources.mdx

Lines changed: 351 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,351 @@
1+
---
2+
title: Sources
3+
description: Configure credentials for music sources like YouTube, Spotify, Deezer, Tidal, and more.
4+
---
5+
6+
import { Aside } from "@astrojs/starlight/components";
7+
8+
Learn how to retrieve the tokens and credentials needed for each music source.
9+
10+
## Source Credentials Guide
11+
12+
Most sources work out of the box, but some require tokens or API keys for search and/or playback. Below is a step-by-step guide for each source that needs credentials.
13+
14+
<Aside type="tip">
15+
All credentials go into your `config.toml` under the corresponding `[sources.<name>]` section.
16+
</Aside>
17+
18+
---
19+
20+
### YouTube
21+
22+
YouTube supports an **OAuth device flow** built into Rustalink. This is needed for playback via the TV client.
23+
24+
<Aside type="caution">
25+
Use a **burner Google account** — do not use your personal account.
26+
</Aside>
27+
28+
**Option A — Automatic (recommended)**
29+
30+
1. Set `get_oauth_token = true` in your config:
31+
```toml
32+
[sources.youtube]
33+
enabled = true
34+
get_oauth_token = true
35+
```
36+
2. Start Rustalink. The console will print a URL and a code:
37+
```
38+
1. Visit: https://www.google.com/device
39+
2. Enter code: XXXX-XXXX
40+
```
41+
3. Open the URL in your browser, log in with a **burner account**, and enter the code.
42+
4. Rustalink will display the `refresh_token` in the console. Copy it.
43+
5. Paste it into your config and disable the flow:
44+
```toml
45+
[sources.youtube]
46+
enabled = true
47+
get_oauth_token = false
48+
refresh_tokens = ["your-refresh-token-here"]
49+
```
50+
51+
**Option B — Manual**
52+
53+
If you already have a refresh token (e.g. from another Lavalink instance), paste it directly:
54+
55+
```toml
56+
[sources.youtube]
57+
enabled = true
58+
refresh_tokens = ["your-refresh-token"]
59+
```
60+
61+
---
62+
63+
### Spotify
64+
65+
<Aside type="note">
66+
Spotify **does not require any credentials**. Rustalink handles authentication automatically using an anonymous session token.
67+
</Aside>
68+
69+
Optionally you can configure a proxy:
70+
71+
```toml
72+
[sources.spotify]
73+
enabled = true
74+
# proxy = { url = "http://proxy:8080", username = "user", password = "pass" }
75+
```
76+
77+
---
78+
79+
### Deezer
80+
81+
Deezer requires an **ARL token** (authentication cookie) for playback.
82+
83+
1. Open [deezer.com](https://www.deezer.com) and log in.
84+
2. Open your browser DevTools (`F12`**Application** tab → **Cookies**).
85+
3. Find the cookie named `arl` on the `deezer.com` domain.
86+
4. Copy its value (a long alphanumeric string).
87+
5. Paste it into your config:
88+
```toml
89+
[sources.deezer]
90+
enabled = true
91+
arls = ["your-arl-token"]
92+
```
93+
94+
<Aside type="tip">
95+
You can provide **multiple ARLs** from different accounts for load balancing:
96+
```toml
97+
arls = ["arl-account-1", "arl-account-2"]
98+
```
99+
</Aside>
100+
101+
You also need the `master_decryption_key` for FLAC playback (find it yourself — it is not provided here for legal reasons).
102+
103+
---
104+
105+
### Tidal
106+
107+
Tidal supports a **built-in OAuth device flow**, similar to YouTube.
108+
109+
**Option A — Automatic (recommended)**
110+
111+
1. Set `get_oauth_token = true` in your config:
112+
```toml
113+
[sources.tidal]
114+
enabled = true
115+
get_oauth_token = true
116+
```
117+
2. Start Rustalink. The console will print a login URL:
118+
```
119+
1. Visit: https://login.tidal.com/activate?...
120+
2. Log in and authorize the application.
121+
```
122+
3. Open the URL, log in with your Tidal account, and authorize.
123+
4. Rustalink will display the `refresh_token` in the console. Copy it.
124+
5. Paste it into your config and disable the flow:
125+
```toml
126+
[sources.tidal]
127+
enabled = true
128+
get_oauth_token = false
129+
refresh_token = "your-refresh-token"
130+
```
131+
132+
**Option B — Manual**
133+
134+
If you already have a refresh token, paste it directly:
135+
136+
```toml
137+
[sources.tidal]
138+
enabled = true
139+
refresh_token = "your-refresh-token"
140+
```
141+
142+
---
143+
144+
### SoundCloud
145+
146+
SoundCloud works without credentials (auto-discovery), but you can provide a custom `client_id`:
147+
148+
1. Open [soundcloud.com](https://soundcloud.com) in your browser.
149+
2. Open DevTools (`F12`**Network** tab).
150+
3. Play any track and look for API requests to `api-v2.soundcloud.com`.
151+
4. Find the `client_id` query parameter in any request URL.
152+
5. Paste it into your config:
153+
```toml
154+
[sources.soundcloud]
155+
enabled = true
156+
client_id = "your-client-id"
157+
```
158+
159+
---
160+
161+
### Qobuz
162+
163+
Qobuz requires a user token for playback. App credentials (`app_id` and `app_secret`) are optional overrides; by default they are automatically extracted from play.qobuz.com.
164+
165+
1. Open [play.qobuz.com](https://play.qobuz.com) and log in.
166+
2. Open DevTools (`F12`**Network** tab).
167+
3. Look for API requests to `www.qobuz.com/api.json/`.
168+
4. In the request headers, find the `X-User-Auth-Token` header → this is your `user_token`.
169+
170+
Optionally, you can override the auto-detected Qobuz app credentials:
171+
172+
- In the request URL parameters, find `app_id`.
173+
- For `app_secret`, inspect the Qobuz JavaScript bundle and search for the secret key.
174+
175+
Configure:
176+
```toml
177+
[sources.qobuz]
178+
enabled = true
179+
user_token = "your-user-token"
180+
# Optional: override auto-detected app credentials
181+
# app_id = "your-app-id"
182+
# app_secret = "your-app-secret"
183+
```
184+
185+
---
186+
187+
### Yandex Music
188+
189+
Yandex Music requires an OAuth access token.
190+
191+
1. Go to [oauth.yandex.com/authorize?response_type=token&client_id=23cabbbdc6cd418abb4b39c32c41195d](https://oauth.yandex.com/authorize?response_type=token&client_id=23cabbbdc6cd418abb4b39c32c41195d).
192+
2. Log in with your Yandex account and authorize.
193+
3. After redirect, copy the `access_token` from the URL fragment.
194+
4. Configure:
195+
```toml
196+
[sources.yandexmusic]
197+
enabled = true
198+
access_token = "your-oauth-token"
199+
```
200+
201+
---
202+
203+
### VK Music
204+
205+
VK Music requires a user token and cookie from the browser.
206+
207+
1. Open [vk.com](https://vk.com) and log in.
208+
2. Open DevTools (`F12`**Network** tab).
209+
3. Look for a POST request to `/?act=web_token`.
210+
4. In the **Response**, copy the `access_token` field.
211+
5. In the **Request** headers, copy the full `Cookie` header value.
212+
6. Configure:
213+
```toml
214+
[sources.vkmusic]
215+
enabled = true
216+
user_token = "your-vk-access-token"
217+
user_cookie = "your-full-vk-cookie"
218+
```
219+
220+
---
221+
222+
### Apple Music
223+
224+
Apple Music can work without credentials (metadata only), but providing a `media_api_token` enables full features.
225+
226+
1. Open [music.apple.com](https://music.apple.com) in your browser.
227+
2. Open DevTools (`F12`**Network** tab).
228+
3. Look for API requests to `amp-api.music.apple.com`.
229+
4. In the request headers, find the `Authorization` header starting with `Bearer`.
230+
5. Copy the token (everything after `Bearer `).
231+
6. Configure:
232+
```toml
233+
[sources.applemusic]
234+
enabled = true
235+
media_api_token = "your-media-api-token"
236+
```
237+
238+
---
239+
240+
### Last.fm
241+
242+
Last.fm requires an API key for search functionality.
243+
244+
1. Go to [last.fm/api/account/create](https://www.last.fm/api/account/create).
245+
2. Fill in the application form (name, description, callback URL can be anything).
246+
3. After creation, copy your **API Key**.
247+
4. Configure:
248+
```toml
249+
[sources.lastfm]
250+
enabled = true
251+
api_key = "your-lastfm-api-key"
252+
```
253+
254+
---
255+
256+
### Twitch
257+
258+
Twitch works without credentials (auto-discovery from twitch.tv), but you can provide a custom `client_id`:
259+
260+
1. Go to [dev.twitch.tv/console/apps](https://dev.twitch.tv/console/apps) and log in.
261+
2. Register a new application.
262+
3. Copy the **Client ID**.
263+
4. Configure:
264+
```toml
265+
[sources.twitch]
266+
enabled = true
267+
client_id = "your-client-id"
268+
```
269+
270+
---
271+
272+
### Audius
273+
274+
Audius works by default but you can provide a custom app name:
275+
276+
1. Go to [docs.audius.org](https://docs.audius.org) to register an app name.
277+
2. Configure:
278+
```toml
279+
[sources.audius]
280+
enabled = true
281+
app_name = "your-app-name"
282+
```
283+
284+
---
285+
286+
### Pandora
287+
288+
Pandora usually works out of the box. CSRF/auth tokens are fetched automatically for search.
289+
290+
If you have issues with Pandora search or need to override the automatically-detected token, you can optionally provide a custom CSRF token:
291+
292+
1. Open [pandora.com](https://www.pandora.com) in your browser (may require a US VPN).
293+
2. Open DevTools (`F12`**Network** tab).
294+
3. Look for API requests and find the `csrftoken` cookie or header.
295+
4. Configure:
296+
```toml
297+
[sources.pandora]
298+
enabled = true
299+
# Optional manual override:
300+
csrf_token = "your-csrf-token"
301+
```
302+
303+
---
304+
305+
### Amazon Music
306+
307+
Amazon Music supports search by default. For direct playback, a custom API URL is required.
308+
309+
```toml
310+
[sources.amazonmusic]
311+
enabled = true
312+
# api_url = "http://localhost:3000/"
313+
```
314+
315+
<Aside type="note">
316+
The custom API URL for Amazon Music direct playback is self-hosted. Refer to the project documentation for setup instructions.
317+
</Aside>
318+
319+
---
320+
321+
### JioSaavn
322+
323+
JioSaavn works without credentials for basic usage. For direct streaming you can configure a custom API URL or a decryption key:
324+
325+
```toml
326+
[sources.jiosaavn]
327+
enabled = true
328+
# apiUrl = "http://localhost:3000/"
329+
# decryption = { secretKey = "your-secret-key" }
330+
```
331+
332+
---
333+
334+
### Sources Without Credentials
335+
336+
The following sources work **out of the box** with no credentials needed:
337+
338+
| Source | Notes |
339+
| :--- | :--- |
340+
| **Gaana** | Works automatically |
341+
| **Shazam** | Works automatically |
342+
| **Mixcloud** | Works automatically |
343+
| **Bandcamp** | Works automatically |
344+
| **Audiomack** | Works automatically |
345+
| **NetEase** | Works automatically |
346+
| **Anghami** | Works automatically |
347+
| **HTTP** | Direct URL playback |
348+
| **Local** | Local file playback |
349+
| **Google TTS** | Text-to-speech |
350+
| **Flowery TTS** | Text-to-speech |
351+
| **Reddit** | Works automatically |

0 commit comments

Comments
 (0)