Bug 6943 - duration value in playerstatus is wrong when next track is streaming
: duration value in playerstatus is wrong when next track is streaming
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: CLI
: 7.0
: Macintosh Other
: P3 normal (vote)
: ---
Assigned To: Squeezebox QA Team email alias
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-04 14:49 UTC by Andy Grundman
Modified: 2009-09-08 09:21 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Grundman 2008-02-04 14:49:48 UTC
To reproduce:

Play Pandora.
At 10 seconds left in the track, the next one will begin streaming.
Duration value sent in playerstatus is the value for the next track, so causes progress bars to display the wrong remaining time.
Comment 1 Andy Grundman 2008-02-04 15:01:32 UTC
Since Pandora re-uses the same track object for all tracks, and playerstatus is always reading from the database, I think the only way to fix this is to add a 'secs' value to getMetadataFor.
Comment 2 Blackketter Dean 2008-02-04 18:17:07 UTC
Andy: is this new?
Comment 3 Andy Grundman 2008-02-04 20:45:08 UTC
No it would have been broken this way forever, I guess nobody noticed the progress bar was wrong in the last 10 seconds of a song.
Comment 4 Andy Grundman 2008-02-04 21:37:45 UTC
Fixed in change 17220.
Comment 5 Chris Owens 2008-03-07 09:03:31 UTC
This bug is being closed since it was resolved for a version which is now released!  Please download the new version of SqueezeCenter (formerly SlimServer) at http://www.slimdevices.com/su_downloads.html

If you are still seeing this bug, please re-open it and we will consider it for a future release.
Comment 6 Michael Herger 2009-04-15 02:18:26 UTC
I've checked in a code cleanup which touches the fix Andy added for this bug (change 25960). Please test with the latest builds to make sure I didn't break anything. Pandora won't let me play today.

Andy - I removed the addResult() call adding duration in _songInfo(), as it added the duration in all queries calling _songInfo(), even if duration wasn't needed. Plus I think it was redundant in the case where duration was queried, as you set $remoteMeta{duration} too, which then would be used to return the duration. (plus I didn't like the addResult call, as it's the only one actually changing the request object)