From: Max Kellermann Date: Sun, 28 Sep 2008 08:56:27 +0000 (+0200) Subject: screen_play: repaint highlight when mpd starts playing X-Git-Tag: v0.12_alpha1~136 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6ca92d80ddb859fef30f45c71556f5296127875f;p=ncmpc.git 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. --- diff --git a/src/screen_play.c b/src/screen_play.c index 4ee131c..25e82c7 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;