Add daily play counts to the song detail endpoint

Scopes listen_counts() to a single artist/track, the same way
recent() was scoped for song history, so the song page can drive a
per-track activity chart over the last 90 days.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
mattandClaude Sonnet 5 committed 2026-10-05 15:33:06 +01:00
1 parent bef41fc2cc
commit 86bf9fd302
5 files changed
+37 -2

No files matched your search

+3
View File
@@ -171,6 +171,9 @@ class TrackDetailSchema(PageMetaSchema):
track = fields.String()
metadata = fields.Nested(TrackMetadataSchema)
items = fields.List(fields.Nested(ScrobbleSchema))
counts = fields.List(
fields.Nested(CountSchema), metadata={"description": "Daily plays over the last 90 days"}
)
class SummarySchema(Schema):