Repository navigation
darkbot v0.4.0
What's new
Song requests on YouTube Music through Pear Desktop
!sr now also queues on YouTube Music. YouTube Music has no public queue
API, so darkbot uses Pear Desktop (the open-source YouTube Music app,
formerly th-ch/youtube-music) and its API Server plugin, like the
Streamer.bot extensions do. darkbot only connects to 127.0.0.1 as a
client, so it still opens no port. The streamer allows darkbot once in
Pear Desktop; the token lives in the OS keychain.
Routing between Spotify and YouTube Music:
- a link goes to the service it belongs to (open.spotify.com /
music.youtube.com, youtube.com, youtu.be) - "!sr " searches on the service chosen in the settings, or on
the other one while that one is off - !song, !next, !queue and !skip use the service playing right now
- other links get "this kind of link doesn't work here"
Pear Desktop answers "added" even for IDs it can't add, and adds
asynchronously. darkbot therefore serialises adds and watches the queue
until the song shows up (at most 5 s) before it confirms in chat. Links
are resolved by searching their video ID, so title, length and the
explicit mark are known and the length limit and explicit filter work
like on Spotify.
Tested end to end against Pear Desktop 3.12.1: search, links, playlist
refusal, duplicates, !song/!next/!queue/!skip. That run found one bug,
now fixed: Pear Desktop's Node server closes idle connections after
5 s, so a request after a pause failed with "connection reset". The
client now opens a fresh connection per request.
UI: a YouTube Music block in Settings > Song requests (switch, status,
setup steps, port, connect with cancel, disconnect) and the choice of
search service. When YouTube Music is on, the dashboard shows a card
with the date Pear Desktop allowed darkbot, its last answer and a
"check now" button.
Internals: the songs package is now service-neutral (a Player interface
with Spotify and YouTube Music adapters). Spotify gained Playing()
(Get Playback State).
Also fixed: the "Name song titles" checkbox could be reset by a refresh
before saving.
Download
- Windows 10/11:
darkbot-windows-amd64.exe - macOS, Apple Silicon:
darkbot-macos-arm64.app.zip - macOS, Intel:
darkbot-macos-amd64.app.zip - Linux:
darkbot-linux-amd64
Already installed? darkbot updates itself on the next start.
Full changelog: v0.3.0...v0.4.0