Song dimension with Subsonic now-playing and MusicBrainz enrichment #11

Closed
opened 2026-08-26 09:14:13 +00:00 by GKaszewski · 0 comments
Owner

What to build

Song is what a User was listening to when a MoodEntry was logged. Captured at the moment of logging only — a MoodEntry never acquires a Song later.

Stored as its own title, artist, and album rather than as a pointer elsewhere, so a MoodEntry stays readable with nothing else reachable and works for local rips and bootlegs that MusicBrainz has never heard of. An external recording identity is carried when one resolves, and that is what makes two entries about the same recording comparable — without it, "The Beatles" and "the beatles" correlate as two artists.

Auto-fill: the server calls the User's music Provider for now-playing while an entry is being composed, using the ProviderConnection from #5. This is synchronous and on-demand. It is deliberately not a queued job — there is no backfill and nothing for a sweep to rediscover, so per ADR 0004 it does not belong on the queue.

Both the now-playing lookup and the MusicBrainz resolution are best-effort. Either failing must leave the User able to type a song by hand and save the entry.

Acceptance criteria

  • Title, artist, and album persist as the entry's own data, readable with no network call
  • An external recording id is stored when it resolves and omitted when it does not
  • A song with no external match still saves correctly
  • Now-playing auto-fill populates the compose form from the User's connected Provider
  • A failed or slow lookup never blocks saving an entry
  • A User with no ProviderConnection can still attach a song manually
  • Nothing is enqueued as a background job

Blocked by

## What to build `Song` is what a User was listening to when a `MoodEntry` was logged. Captured at the moment of logging only — a `MoodEntry` never acquires a `Song` later. Stored as its own title, artist, and album rather than as a pointer elsewhere, so a `MoodEntry` stays readable with nothing else reachable and works for local rips and bootlegs that MusicBrainz has never heard of. An external recording identity is carried when one resolves, and that is what makes two entries about the same recording comparable — without it, "The Beatles" and "the beatles" correlate as two artists. Auto-fill: the server calls the User's music `Provider` for now-playing while an entry is being composed, using the `ProviderConnection` from #5. This is synchronous and on-demand. It is deliberately **not** a queued job — there is no backfill and nothing for a sweep to rediscover, so per ADR 0004 it does not belong on the queue. Both the now-playing lookup and the MusicBrainz resolution are best-effort. Either failing must leave the User able to type a song by hand and save the entry. ## Acceptance criteria - [ ] Title, artist, and album persist as the entry's own data, readable with no network call - [ ] An external recording id is stored when it resolves and omitted when it does not - [ ] A song with no external match still saves correctly - [ ] Now-playing auto-fill populates the compose form from the User's connected `Provider` - [ ] A failed or slow lookup never blocks saving an entry - [ ] A User with no `ProviderConnection` can still attach a song manually - [ ] Nothing is enqueued as a background job ## Blocked by - #1 - #5
GKaszewski added the ready-for-agent label 2026-08-26 09:14:13 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/k-mood#11