Files
zarzet 06352409c9 perf(scrobbling): wake only when a listen counts or a retry is due
Each connected scrobbler ran a 1 s ticker during playback only to add
elapsed time, and a 30 s retry timer for as long as it was enabled, even
with nothing queued. With three services that is three wake-ups a
second while playing and three every 30 s for the app's lifetime.

The listening time is still measured from the same clock marks, so the
rule is unchanged (half the song, at most four minutes, scaled by
playback speed). Instead of ticking, the scrobbler now arms one timer for
the moment the playing song reaches that threshold, re-armed on every
playback or item update. The 30 s periodic retry exists only while
listens of the signed-in account wait in the queue, and stops when the
queue empties.
2026-11-16 15:57:17 +07:00
..