diff options
author | Max Kellermann <max@duempel.org> | 2008-09-28 10:56:27 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-28 10:56:27 +0200 |
commit | 6ca92d80ddb859fef30f45c71556f5296127875f (patch) | |
tree | d74c570174c04aa0db55d4f543df356402175c5a | |
parent | 3dd3b3fe567abbc004c344a519aa911cff31e568 (diff) | |
download | mpd-6ca92d80ddb859fef30f45c71556f5296127875f.tar.gz mpd-6ca92d80ddb859fef30f45c71556f5296127875f.tar.xz mpd-6ca92d80ddb859fef30f45c71556f5296127875f.zip |
screen_play: repaint highlight when mpd starts playing
When deciding whether to repaint the current highlight, test if MPD is
actually playing. If MPD starts playing, repaint.
-rw-r--r-- | src/screen_play.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/screen_play.c b/src/screen_play.c index 4ee131c70..25e82c7ee 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -419,7 +419,8 @@ static void play_update(mpdclient_t *c) { static int prev_song_id; - int current_song_id = c->song != NULL ? c->song->id : 0; + int current_song_id = c->song != NULL && c->status != NULL && + !IS_STOPPED(c->status->state) ? c->song->id : 0; if (current_song_id != prev_song_id) { prev_song_id = current_song_id; |