Description
Describe the bug
Subtracks does not consider any criteria for submitting a scrobble, Tracks are scrobbled instantly the moment they are tapped on, which leads to unintended data in a user's audioscrobbler profile, even when the user does not intend to play the track at all.
To Reproduce
Steps to reproduce the behavior:
- Enable server-side scrobbling
- Play any track
- Track gets submitted instantly
Expected behavior
The last.fm standards mandate that a scrobble should only be submitted when the track is 30 seconds longer and when the track in question has been played for at least half its duration, or after 4 minutes, whichever condition is fulfilled first.
Screenshots
N/A
Smartphone
- Device: Pocophone F1
- OS: Android 11 (AOSP-based custom ROM)
- Subtracks version: 1.2.0
Additional context
A track that has just started playing should set submission
to false
in the /scrobble
endpoint of the Subsonic API until the conditions for submission are met. This means not only making the scrobbling aware of the player state, but also implementing a separate counter that does not rely on the current seek position but rather the actual duration spent on playing the track (so that the track does not get scrobbled for seeking past half its duration despite not actually being played for that long).