Code

screen_play: query status.id instead of song.id
authorMax Kellermann <max@duempel.org>
Wed, 30 Sep 2009 19:05:45 +0000 (21:05 +0200)
committerMax Kellermann <max@duempel.org>
Wed, 30 Sep 2009 19:05:45 +0000 (21:05 +0200)
src/screen_play.c

index 08c1ce34f5e463933fbed8b54cfaa725b20b2c3a..0f31032d1175ac78fd6ec0f567cfcf72c657fbaa 100644 (file)
@@ -568,9 +568,9 @@ play_update(struct mpdclient *c)
        if (c->events & MPD_IDLE_PLAYLIST)
                playlist_restore_selection();
 
-       current_song_id = c->song != NULL && c->status != NULL &&
+       current_song_id = c->status != NULL &&
                !IS_STOPPED(mpd_status_get_state(c->status))
-               ? (int)mpd_song_get_id(c->song) : -1;
+               ? (int)mpd_status_get_song_id(c->status) : -1;
 
        if (current_song_id != prev_song_id) {
                prev_song_id = current_song_id;