My favorites | Sign in
Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 26: [patch] Disobedience shows wrong track elapsed time after a pause
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ewxrjk
Closed:  Jan 2009


Sign in to add a comment
 
Reported by crazyscot, Jan 30, 2009
1. Open Disobedience. Start a track. Pause it. The length field pauses too;
all well and good.
2. Leave it paused for a good few seconds.
3. Unpause, note that the length jumps to something odd as it continues.

This is with the disorder.dev trunk, updated to this morning, on ubuntu
8.10, amd64.

Tentative patch attached - WFM locally though I'm not sure it's 100% correct.

disobedience_elapsed_time.patch
423 bytes Download
Comment 1 by ewxrjk, Jan 30, 2009
last_playing is supposed to be the timestamp that the last 'playing' command executed
at - i.e. the time that its sofar field applies to.

Elsewhere in queue.c we use the arrival of the 'playing' reply as a proxy for this,
but the patch uses the issuance of the command.  Arrival rather than issuance makes
more sense; there may be a significant delay between Disobedience issuing the command
and the server acting on it (for instance if we are not connected yet or are busily
stacking up name lookups for hundreds of tracks) but it'll arrive very soon after
being executed.

queue_playing_changed() is where it is currently set though playing_completed() might
actually make more sense.

I think there are better strategies overall though.  For instance the playing reply
could contain the expected termination time; with the length this is enough to
compute how far through the track we are without keeping track of when the reply
arrived.  I'll have a play with this idea some time.
Status: Accepted
Owner: richard+...@sfere.greenend.org.uk
Comment 2 by ewxrjk, Jan 31, 2009
revno: 833
committer: Richard Kettlewell <rjk@greenend.org.uk>
branch nick: disorder.dev
timestamp: Sat 2009-01-31 12:29:04 +0000
message:
  Disobedience updates last_playing whenever a 'playing' command
  completes now.  This mostly keeps the played so far field correct
  though it does briefly jump to a wrong value and then back when you
  unpause.
  
  http://code.google.com/p/disorder/issues/detail?id=26

Status: Started
Comment 3 by ewxrjk, Jan 31, 2009
revno: 834
committer: Richard Kettlewell <rjk@greenend.org.uk>
branch nick: disorder.dev
timestamp: Sat 2009-01-31 12:33:59 +0000
message:
  Set last_playing to NULL when we don't have up to date information
  about the playing track (including, importantly, just after pausing).
  column_length() returns NULL in this case, and ql_update_row() leaves
  cells that have a NULL value along.
  
  The effect is that the played so far indicator is left as it is until
  we're sure what the right value is.  Usually in fact it will already
  be right, so we don't even lie; when it isn't, at least it jumps
  around less before reaching the right value.
  
  http://code.google.com/p/disorder/issues/detail?id=26
Status: Fixed
Sign in to add a comment

Hosted by Google Code