Repository navigation
feat(playlists): artist mixes - #846
Merged
Merged
Conversation
One mix per artist the user listens to most: up to 15 of its tracks among those of up to 8 neighbours, 4 each, from the similar-artists cache then the artists played in the same sessions, never the network. The cache read moves to core, shared with the radio.
A session neighbour now needs three of its plays near the artist's and a quarter of the closest neighbour's, counted as distinct plays rather than pairs. Without that floor eight places reached deep into artists that only shared a shuffled session.
Two files of one song, same artist and title, merge into the best copy with the plays of both, so a library holding a track twice no longer puts it in a mix twice. Genre and decade seeds count songs, not files, before the per-artist cap, and a seed that falls short leaves its place to the next.
An artist mix is mostly the artist, and its neighbours are often in a library by a single or two: eight of them brought 24 songs once copies were merged, one short of the genre floor, and the mix disappeared.
An artist is a seed with four songs once copies are merged, and a mix needs fifteen: in a library of singles the most played artists hold a handful and their neighbours one or two. A seed that falls short leaves its place. The scan's backfill attempt counter wrote a value type the table refuses, so no attempt was recorded and a folder with one unreadable file was re-read on every scan; it writes int now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A third generated family next to the genre and decade mixes from #841: one mix per artist the user listens to most. Each mix holds that artist plus its neighbours. Along the way, two fixes apply to every mix, plus a bug in the scanner.
Artist mixes (
themed::regenerate_artist_mixes)listened_msover 90 days that hold 4 songs once copies are merged. Nine are read for three mixes, so an artist that falls short leaves its place to the next one. There is no fallback without listening history: the family is "the artists you play".app.lastfm_similar), in its own order, keeping only artists with an available track.co_listened_artists). A session neighbour needs 3 distinct plays and a quarter of the closest neighbour's count.ArtistMix { artist_id }, at positions 10+. Names come from the frontend'sartist_name/artist_descriptiontemplates, in all 17 locales.Shared similar-artists read
The cache read moves from
commands/radio.rstowaveflow_core::similar. The radio and the mixes now share one implementation, and the radio still fills the cache before reading it.One copy per song, in every mix (
dedupe)Two files of the same song (same artist, same title under
canonical_name, for example an MP3 and its Hi-Res re-buy) used to land in a mix twice. Now:Scanner fix (from #840)
write_counterwrotevalue_type 'number', whichprofile_setting's CHECK refuses. As a result:It now writes
'int', and a test writes the counter and reads it back.Testing
cargo clippy --workspace --all-targets -- -D warnings,cargo fmt --check.cargo test -p waveflow-core --features sqlite themed(6 tests):bun run typecheck,bun run lint.Summary by CodeRabbit