3 Commits
Author SHA1 Message Date
mattandClaude Sonnet 5.5 65ee13fa65 Rename the product Scrobbled
Display name only: UI, docs, API title, dashboards, hashtag and User-Agent.
Identifiers (package, metrics, env vars, SCROBBLER_CONFIG) are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 21:21:55 +01:00
mattandClaude Sonnet 5 44abd70caa Attach cover art to ActivityPub "now playing" posts
CI / lint (push) Successful in 11s
CI / test (push) Successful in 3m31s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / trigger-deploy (push) Skipped
CI / notify (push) Successful in 5s
CI / validate-monitoring (push) Successful in 9s
CI / federation-interop (push) Successful in 1m38s
Note objects can now carry an optional attachment (an AS2 Image),
which Mastodon and other AP servers render as the post's media. Only
"now playing" posts use it for now - it's the only post type tied to
a single track, and therefore the only one with one unambiguous
album; weekly summaries and milestones aggregate many tracks.

The attachment points straight at the Cover Art Archive URL cached
in AlbumArt, not our own authenticated /api/v1/art/album proxy - a
remote server fetches attachments unauthenticated, and Cover Art
Archive is already public. The lookup happens in the periodic
now-playing worker task, not a request, so a cache-miss MusicBrainz/
Cover Art Archive call adds no request latency.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Hn2QwS1HRT8tFAzo8ew63
2026-10-06 19:16:29 +01:00
mattandClaude Sonnet 5 ba30d5cb15 Now-playing publisher and worker task (phase 4, step 3)
CI / validate-monitoring (push) Successful in 8s
CI / lint (push) Successful in 11s
CI / federation-interop (push) Successful in 1m7s
CI / test (push) Successful in 3m15s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / notify (push) Successful in 6s
publishing/now_playing.py: a periodic scan (federation.now_playing,
every 30s) that pushes a throttled Update(Person) for the profile
field (5 minutes) and, for users opted into posts, publishes a Note
after a track's been playing 30+ seconds (throttled to 30 minutes),
deleting the previous now-playing post once the new one is confirmed
published - not before, so a failed publish never leaves a user with
none showing. Reuses publishing.publish()/delete_post() unchanged;
now_playing is just another post kind.

Fixed a real bug before it ever ran against Postgres: the key
(artist/track/started_at) was going straight into federation_posts.key
(VARCHAR(64)), which routinely overflows for real track and artist
names. Hashed instead - it's an idempotency token, not something
anyone needs to read.

New metric scrobbler_federation_profile_updates_total{result}; posts
already get scrobbler_federation_posts_total{kind="now_playing",...}
for free from the existing publish() instrumentation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
2026-09-26 17:13:10 +01:00