Scrobbling: the UI reports "now playing" when a song starts, and a listen
once half of it (or 4 minutes) has actually been played. Library songs go
through Subsonic's scrobble endpoint, which keeps play counts and passes
them on to the user's Listenbrainz/Last.fm; YouTube songs go straight to
Listenbrainz with listenbrainz.token. discover.scrobble = false turns it
off. Also stops the previous YouTube video when moving to the next YouTube
song, as it played on while the next was looked up.
Fresher suggestions: each mix's suggestions are a random sample of its
best 3 x discovery_count candidates, weighted by fit squared, rather than
always the top ones. Suggestions left alone for a week expire, and stay
out of the mixes for 60 days.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Range inputs have a default width (180px in Firefox) they won't shrink
below in a flex row, so the volume slider ran over the queue count.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
YouTube's bot checks block yt-dlp from fetching audio on the server, so
suggested songs now play in YouTube's embedded player, kept out of sight,
in the browser. yt-dlp is only used to search.
- GET /api/discover/youtube/<id> returns candidate video IDs, best first,
or the one that played before (?refresh=true searches again).
- PUT /api/discover/youtube/<id> remembers the video that played.
- The UI tries the next candidate when a video can't be embedded, searches
again when a remembered video is gone, and skips the song otherwise.
- Drop the YouTube audio proxy, and Deno from the image.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add a form to create a cluster mix rule: shown on first visit when there
are no rules, and from a + in the sidebar for another Listenbrainz user.
Backed by POST /api/discover/rules, which validates each setting and
allows one rule per Listenbrainz user.
- Add deleting a user's mixes from a bin in the sidebar, optionally also
deleting the mixes' playlists from Subsonic. Backed by
DELETE /api/discover/rules/<id>?delete_playlists=true.
- Stop showing the previous user's mix while a new user's mixes build.
- Remove the per-account Listenbrainz token: LB Radio now always uses
listenbrainz.token from the config. A migration drops the token columns
from app_user, and PUT /api/auth/account/listenbrainz is gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first visit to the UI creates the account from a username and password;
after that every API route needs a session cookie from logging in. Accounts
are stored in app_user (Argon2id password hashes) and sessions in
user_session (SHA-256 token hashes, 30 days).
The account page lets the user save a Listenbrainz token, checked with
Listenbrainz first. It takes priority over listenbrainz.token from the
config for LB Radio suggestions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A "Tracked playlists" page in the web UI lists, creates, edits, refreshes
and removes tracked playlists, and manages the rules that create a new
tracked playlist each period.
- New /api/tracked routes. Input is validated with readable errors,
including name templates, which made the create daemon panic when they
had an invalid % code.
- New playlists can be created in Subsonic or picked from existing ones.
Genre mix playlists can't be tracked, since two daemons would fight
over their songs.
- "Refresh" updates a playlist straight away, and the page shows when
some of the top songs couldn't be found in the library.
- Removing a playlist can also delete it from Subsonic.
- Rule names preview live as you type.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018opPJMJjLWr4RqdG6vuK6p
"Play mix" in the discover UI used to spread new songs through the whole
library playlist, so the share of new songs depended on how many there
were. It now plays the new songs with songs the user has played mixed in
evenly at the rule's familiar_ratio (30% by default), the same ratio that
sets how much of the Subsonic playlist is familiar.
Which songs in each mix playlist were played recently is now recorded
when the mix is built (cluster_mix_playlist.known_song_ids) and returned
with the mix; the UI marks them as "Played". Mixes built before this fall
back to using the library songs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018opPJMJjLWr4RqdG6vuK6p
Each mix rebuild now also finds songs that aren't in the library: the
user's Listenbrainz recommendations they've never played, plus an LB
Radio prompt per mix when a Listenbrainz token is configured. Each
candidate goes to the mix whose genre profile it fits best and is
skipped if it's already in the library or was played recently.
discover/ is a new React app to listen to the mixes: library songs
stream from Subsonic and suggested songs are found on YouTube with
yt-dlp, both proxied through playlistd with Range support for seeking.
Suggestions can be liked (kept in a "Liked new songs" list) or hidden.
- discover: candidate gathering, genre fit scoring, library filtering
- web: /api/discover routes, Subsonic/YouTube streaming proxy
- youtube: yt-dlp search (skipping hour-long results) and audio URLs
- mix tags now hold library genre names, for display in the UI
- config: listenbrainz.token, discover.ui, discover.ytdlp, discover.format
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018opPJMJjLWr4RqdG6vuK6p