summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3af7654)
getting too out of date. This can happen if the queue is not empty
but nothing is playing. Fixes issue #49.
<td>build-time dependency on <tt>oggdec</tt> removed</td>
</tr>
<td>build-time dependency on <tt>oggdec</tt> removed</td>
</tr>
+ <tr>
+ <td><a href="http://code.google.com/p/disorder/issues/detail?id=49">#49</a></d>
+ <td>Disobedience's 'When' column gets out of date</td>
+ </tr>
+
ql->ncolumns + QUEUEPOINTER_COLUMN, nqd->new,
-1);
it = gtk_tree_model_iter_next(GTK_TREE_MODEL(ql->store), iter);
ql->ncolumns + QUEUEPOINTER_COLUMN, nqd->new,
-1);
it = gtk_tree_model_iter_next(GTK_TREE_MODEL(ql->store), iter);
+ /* We'll need the new start time */
+ nqd->new->when = q->when;
++kept;
} else {
/* Delete this row (and move iter to the next one) */
++kept;
} else {
/* Delete this row (and move iter to the next one) */
/* If there's a track playing, update its row */
if(playing_track)
ql_update_row(playing_track, 0);
/* If there's a track playing, update its row */
if(playing_track)
ql_update_row(playing_track, 0);
+ /* If the first (nonplaying) track starts in the past, update the queue to
+ * get new expected start times; but rate limit this checking. (If we only
+ * do it once a minute then the rest of the queue can get out of date too
+ * easily.) */
+ struct queue_entry *q = ql_queue.q;
+ if(q) {
+ if(q == playing_track)
+ q = q->next;
+ if(q) {
+ time_t now;
+ time(&now);
+ if(q->expected / 15 < now / 15)
+ queue_changed(0,0,0);
+ }
+ }