diff options
author | Max Kellermann <max@duempel.org> | 2008-09-18 01:55:45 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-18 01:55:45 +0200 |
commit | fe8895120e565f83f18fb3c0af7a0bbbc881e5d9 (patch) | |
tree | 61b2c130865a9f0bbeb43761a95596e9e4561dc8 /src/screen_play.c | |
parent | f0aa88e5c18de0b1e4f5d85dd5c3ae5d9be76bc3 (diff) | |
download | mpd-fe8895120e565f83f18fb3c0af7a0bbbc881e5d9.tar.gz mpd-fe8895120e565f83f18fb3c0af7a0bbbc881e5d9.tar.xz mpd-fe8895120e565f83f18fb3c0af7a0bbbc881e5d9.zip |
playlist: removed "updated" flag
The caller may check the playlist.id instead of checking the old
"updated" flag.
Diffstat (limited to '')
-rw-r--r-- | src/screen_play.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/screen_play.c b/src/screen_play.c index c89d150cf..cd43982c3 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -51,6 +51,7 @@ typedef struct } completion_callback_data_t; static list_window_t *lw = NULL; +static long long playlist_id; static void playlist_changed_callback(mpdclient_t *c, int event, gpointer data) @@ -398,14 +399,14 @@ play_update(screen_t *screen, mpdclient_t *c) } } - if( c->playlist.updated ) { + if (c->playlist.id != playlist_id) { if (lw->selected >= c->playlist.list->len) lw->selected = c->playlist.list->len - 1; if (lw->start >= c->playlist.list->len) list_window_reset(lw); play_paint(screen, c); - c->playlist.updated = FALSE; + playlist_id = c->playlist.id; } else if( lw->repaint || 1) { list_window_paint(lw, list_callback, (void *) c); wnoutrefresh(lw->w); |