[BUG] inaccurate scrobbles when playing songs offline

App version

Production

Issue description

EDIT: I forgot to send the log the first time i posted, and now i can’t upload it on an edit
I use Symfonium with Navidrome. And today i took a look inside Navidrome’s DB and noticed that some songs had scrobbles with the same timestamp.

Device type

Phone

Media provider

Navidrome

Steps to reproduce

To reproduce the issue, i downloaded the songs in the screenshot and played them while disconnected from the internet, and consequently from the server. Then i did some tests.

Here’s what test each row in the screenshot represents:
1st: Me listening to the same song 9 times
2nd: Me playing 3 times, waiting one minute (Longer than the song’s duration) and playing 3 times again (Note the duplicated timestamps weren’t divided into 2)
3rd/4th: 2x Shipwrecks and treasure, 2x Where hidden magic sleeps and 2x Shipwrecks and treasure again (Noticed how these weren’t split into 3 either)
5th: Played it for 3 times and noticed the timestamp matched exactly with the time when i finished playing for the 3rd time.

Additional information

Conclusion

This is my theory:
When Symfonium has no access to the server, it saves all song scrobbles on a buffer. When a song inside the buffer is played >1 times, the scrobble count for that song is increased and the timestamp is overwritten with the new one. When Symfonium gets a connection to the server, it sends all scrobbles inside the buffer count times, all with the same timestamp, then clears the buffer.

Fix

The buffer should contain individual scrobbles, meaning instead of grouping scrobbles by song and overwriting the timestamp repeatedly, it should save every scrobble as an independent item.

About the logfile

I didn’t know sending the logfile was required, so in the log, i did this:

  1. Disconnected from the internet
  2. Played “Shipwrecks and Treasure” 3 times (Not the same 3 in the screenshot),
  3. Connected to the internet and my Navidrome server.

I confirmed the timestamp on all 3 scrobbles were the same

Screenshots

I searched existing issues first

on

I understand that logs are mandatory

on

Log upload name / description

debug.log

Yes this is by design and due to how things works in the API of most media centers. The main need is to ensure consistency in all cases for the playcounts and lastplayed value across all cases, not perfect offline scrobbling at the exact seconds.