feat(scrobble): time-travel navigator (year/month) + fix stats cover art
Navigator (web + android): browse Alles / Jahr / Monat with a ‹ › stepper — see top plays for a specific month or year (e.g. March 2024). Steps into the future are disabled. Uses the existing /scrobble/stats endpoint with computed from/to + bucket (month for year view, day for month view). All windows verified. Cover art fix: the app resolves covers from the Subsonic **coverArt token**, not the raw entity id — so stats covers (which used albumId/songId) never loaded. Now the play-log stores each play's coverArt (web + android capture), the stats endpoint returns it for top tracks/albums, and both clients render coverUrl(coverArt) with an id fallback. Old plays lack coverArt (blank until re-listened); artist images still use artistId (may need getArtistInfo2 later if blank). Schema migrates existing DBs via ALTER TABLE. SW cache -> ns-v69. Android compileDebugKotlin + web build green; server windows + cover storage unit-tested. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
14c0dea7e4
commit
86eb893f40
8 files changed
+184
-63
No files matched your search
@@ -40,6 +40,7 @@ export function logPlay(song, source = 'web') {
|
||||
artistId: song.artistId ?? null,
|
||||
album: song.album ?? null,
|
||||
albumId: song.albumId ?? null,
|
||||
coverArt: song.coverArt ?? null, // Subsonic coverArt token — what getCoverArt actually needs
|
||||
duration: Number.isFinite(Number(song.duration)) ? Math.floor(Number(song.duration)) : null,
|
||||
playedAt: Math.floor(Date.now() / 1000), // Unix seconds, UTC
|
||||
source,
|
||||
|
||||
Reference in new issue
Block a user