Code

screen_song: correct "is mpd playing?" logic
authorJeffrey Middleton <jefromi@gmail.com>
Wed, 28 Oct 2009 20:34:45 +0000 (15:34 -0500)
committerJeffrey Middleton <jefromi@gmail.com>
Thu, 29 Oct 2009 03:06:00 +0000 (22:06 -0500)
We check if mpd is playing (or paused) before displaying current song
info - the logic was inverted! (!playing && !paused)

src/screen_song.c

index 4c774e8833b8fe30ece23b47d4c7eb063276b8d0..9bb7fbfd3150bf2d19a906ec76f4d49ccdb30158 100644 (file)
@@ -358,8 +358,8 @@ screen_song_update(struct mpdclient *c)
        }
 
        if (c->song != NULL && c->status != NULL &&
-           (mpd_status_get_state(c->status) != MPD_STATE_PLAY &&
-            mpd_status_get_state(c->status) != MPD_STATE_PAUSE)) {
+           (mpd_status_get_state(c->status) == MPD_STATE_PLAY ||
+            mpd_status_get_state(c->status) == MPD_STATE_PAUSE)) {
                if (current.played_song != NULL) {
                        mpd_song_free(current.played_song);
                }