GET /mixes lists the mixes a listener has, GET /mixes/{id}?variant= gives one with its
songs, and POST /mixes/{id}/playlist keeps one as a playlist of their own.
- Genre mixes: one for each genre with at least 30 songs by 4 artists, the genres the
listener plays most first. Spellings that differ by case or punctuation are one
genre (jazz+funk, jazz-funk); other and unknown are not genres.
- Made for the listener: Your favourites, Rediscover (liked artists not played for a
month; both need history) and New to you (songs never played).
- A mix has up to 50 songs, at most 3 by one artist, never two of an artist in a row,
picked by weighted chance (artist preference, never-played, less if played lately;
skipped lately and avoided artists are out). The seed is user, mix, day and variant,
so a mix is steady for a day and another is one variant away.
- Worked out when asked, from the listener's own history and the genre tags; nothing is
stored and nothing leaves the server.
internal/mixes holds the selection and the service, internal/storage/mixes.go the
queries (SQLite and PostgreSQL). Spec, contract test, README and web types follow;
the web app comes separately.
Closes#95