chiark
/
gitweb
/
~mdw
/
disorder
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5c739b2
)
Don't reset played so far counter when queue rearranges (!)
author
Richard Kettlewell
<rjk@greenend.org.uk>
Sat, 9 Aug 2008 12:11:05 +0000
(13:11 +0100)
committer
Richard Kettlewell
<rjk@greenend.org.uk>
Sat, 9 Aug 2008 12:11:05 +0000
(13:11 +0100)
disobedience/queue.c
patch
|
blob
|
blame
|
history
diff --git
a/disobedience/queue.c
b/disobedience/queue.c
index db013d33bad362721e76e307d0003169bf245af7..72da9083c7174152e9d8bf9fa04370c5eeab8d9c 100644
(file)
--- a/
disobedience/queue.c
+++ b/
disobedience/queue.c
@@
-40,7
+40,8
@@
static void playing_completed(void *v,
/** @brief Called when either the actual queue or the playing track change */
static void queue_playing_changed(void) {
/** @brief Called when either the actual queue or the playing track change */
static void queue_playing_changed(void) {
-
+ const char *old_id = playing_track ? playing_track->id : 0;
+
/* Check that the playing track isn't in the queue. There's a race here due
* to the fact that we issue the two commands at slightly different times.
* If it goes wrong we re-issue and try again, so that we never offer up an
/* Check that the playing track isn't in the queue. There's a race here due
* to the fact that we issue the two commands at slightly different times.
* If it goes wrong we re-issue and try again, so that we never offer up an
@@
-66,7
+67,8
@@
static void queue_playing_changed(void) {
playing_track = NULL;
q = actual_queue;
}
playing_track = NULL;
q = actual_queue;
}
- time(&last_playing); /* for column_length() */
+ if(!old_id || !playing_track || strcmp(old_id, playing_track->id))
+ time(&last_playing); /* for column_length() */
ql_new_queue(&ql_queue, q);
/* Tell anyone who cares */
event_raise("queue-list-changed", q);
ql_new_queue(&ql_queue, q);
/* Tell anyone who cares */
event_raise("queue-list-changed", q);