scrobbler.services.stats gains scrobble_count_between, top_artists_between
and top_tracks_between, over [start, end) (start inclusive, end
exclusive) rather than a rolling period. The existing period-based
functions are re-expressed on the same _between() primitive instead of
duplicating the windowing logic.
These are for federation's weekly summaries (phase 3), which need a
fixed Monday-to-Sunday window rather than "N days back". No public API
changes; the Last.fm and /api/v1/me endpoints are unaffected (pinned by
a regression test).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
- Stats service shared by both APIs: recent scrobbles, top artists,
albums and tracks over Last.fm periods, per-day/week/month counts
(with empty days filled) and totals
- Case-insensitive grouping that displays the most common spelling
- user.getInfo, user.getRecentTracks (now playing first, from/to),
user.getTopArtists/Albums/Tracks with Last.fm paging attributes
- /api/v1/me: now-playing, recent, top/{artists,albums,tracks},
counts and summary
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW