FS#6213 - Audioscrobbler incorrectly submits last song

Attached to Project: Rockbox
Opened by Reza (afruff23) - Friday, 20 October 2006, 05:07 GMT
Last edited by Peter D'Hoye (petur) - Sunday, 24 June 2007, 18:46 GMT
Task Type Bugs
Category Music playback
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


This is very easy to reproduce. Listen to a song; do not go past the 50% point (listen for a few seconds or so). Now, while playing, turn off the player (in my case the iAudio X5). This also works even if you stop music playback then turn off(hold play/pause for a few seconds on the X5). When you submit the .log file, it counts this song as played even though you didn't go past the 50% point. I use LogScrobbler 0.8 to submit my songs BTW.
This task depends upon

Closed by  Peter D'Hoye (petur)
Sunday, 24 June 2007, 18:46 GMT
Reason for closing:  Accepted
Additional comments about closing:  Thank you ;)
Comment by Robert Keevil (obo) - Friday, 20 October 2006, 20:10 GMT
Because playback hasn't advanced to the next track, scrobbler.c is using the previous tracks elapsed value.

Attached patch fixes it for me on ipod (where direct shutdown isn't possible - since stop and shutdown share the same button). Does this work when the player is turned straight off?
Comment by Robert Keevil (obo) - Monday, 30 October 2006, 21:38 GMT
This should fix the issue on devices with off buttons. Tested on ipod after enabling the Shutdown option in the main menu.

Can you test this attached patch?
Comment by Linus Nielsen Feltzing (linusnielsen) - Monday, 22 January 2007, 13:27 GMT
Does anybody know if this patch solves the problem for all players? I want to commit it.
Comment by Robert Keevil (obo) - Sunday, 11 February 2007, 22:17 GMT
Re-sync'd and re-tested, on a 5g. I can't see why it would be different on any other SWCODEC target. Needs testing on a HWCODEC device, but logging is currently broken for Archos targets ( FS#6639 ).
Comment by Robert Keevil (obo) - Saturday, 05 May 2007, 10:06 GMT