Repository navigation
Sources
| Source | Prefix | Needs |
|---|---|---|
| YouTube |
yt:, or no prefix |
nothing |
| Spotify | sp: |
nothing; keys only make search use Spotify itself |
| SoundCloud | sc: |
nothing |
| Yandex Music | ym: |
nothing |
| VK Music | vk: |
nothing |
| TikTok | links, or tt: + video number |
nothing |
| Twitch, Mixcloud, Reddit | links | nothing |
| Discord attachments | links | nothing; Discord's links expire about a day after copying |
| The server's music folder | local: |
nothing. See Local music folder |
| Any direct audio link | links |
enabled.http: true in sources.yml
|
| Vimeo, Bandcamp, OCRemix, Soundgasm, Pornhub | links | switched off by default |
Each one can be switched off under enabled in sources.yml. A switched-off source is not registered: its links stop resolving and its prefix stops working. /cdisc admin doctor shows the state of each.
Where a service refuses to talk to a server, CDisc asks its public backend at 2281273.xyz, which reads the track from its own address. It is on by default and needs no keys. It reads:
- YouTube videos YouTube won't serve to your server (
youtube.fallback-api). See YouTube. - Spotify links, to find the track to play.
- Yandex Music and VK links,
ym:andvk:searches, albums and playlists. - SoundCloud tracks, where SoundCloud refuses to load them (
soundcloud.proxy).
On a server located in Russia, CDisc switches on youtube.proxy and soundcloud.proxy once at startup, since both services are slowed or refused there. Every switch of this kind is applied once: set it back to false and it stays false.
What the backend costs is a dependency on someone else's machine. Each service's backend URL can be blanked in sources.yml, and the tokens in tokens.yml are then used alone.
Spotify does not hand out its audio. CDisc reads the track from Spotify, then finds the same recording on YouTube: by its ISRC and by artist and title at the same time, with the ISRC winning when it finds anything. Playlists and albums work without keys.
sp:<words> searches YouTube unless Spotify keys are set, in which case it searches Spotify itself:
- Open developer.spotify.com, Dashboard, Create app. No redirect URI is needed.
- Copy the Client ID and Client Secret into
spotify.client-idandspotify.client-secretintokens.yml. -
/cdisc admin reload.
Both go through the backend first and need no token. A token in tokens.yml is asked only when the backend cannot be reached.
-
Yandex Music: the authorisation link is in the comment beside
yandex-music.access-tokenintokens.yml. Grant access and copy what followsaccess_token=in the address you land on; it redirects again quickly. -
VK Music: a VK user token with the
audioscope, invk-music.user-token.
VK tracks play as ordinary tracks, with a length and seeking.
Plays directly. Where SoundCloud answers "could not load the track", soundcloud.proxy: true resolves single tracks through the backend. Playlists and sc: search still go to SoundCloud directly.
Video links, short vm.tiktok.com and vt.tiktok.com links, and tt: followed by a video number. No key; seeking works.
Play for as long as the broadcast runs, with no length and no seeking. Their chat shows where the lyrics would be. limits.allow-live: false in permissions.yml refuses them.
enabled.http: true lets a disc point at any audio file on the internet. It is off by default because it makes the server fetch an address a player typed. Links into the server's own network (localhost, the LAN, cloud metadata addresses, private ranges in any wrapping) are refused when the disc is made and every time it plays, redirects included. If you switch it on, consider allowed-hosts in permissions.yml.
An operator doesn't need it: /cdisc admin download <link> saves a file into the music folder instead.
# sources.yml
proxy:
address: "203.0.113.5:8080"sends every request CDisc makes through an HTTP proxy (not SOCKS): the sources, the backend, lyrics and update checks. Its login goes under proxy in tokens.yml. /cdisc admin reload applies a change.
# sources.yml
search:
default-results: 5
max-results: 10 # 10 is the hard ceiling
per-source: {} # e.g. { spotify: 3 }