diff --git a/src/player_command.c b/src/player_command.c
index 505d2fc596d47709089fbb4bef3cbda925a3a1d5..f38147a7c7c7985c3c5c5aee6cbe37209219fbfd 100644 (file)
--- a/src/player_command.c
+++ b/src/player_command.c
/* ncmpc (Ncurses MPD Client)
- * (c) 2004-2009 The Music Player Daemon Project
+ * (c) 2004-2010 The Music Player Daemon Project
* Project homepage: http://musicpd.org
-
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#include "options.h"
#include "i18n.h"
#include "screen_client.h"
-#include "screen_message.h"
+#include "screen_status.h"
int seek_id = -1;
int seek_target_time;
static bool
setup_seek(struct mpdclient *c)
{
- const struct mpd_song *song;
-
- song = mpdclient_get_current_song(c);
- if (song == NULL)
+ if (!mpdclient_is_playing(c))
return false;
- if (seek_id != (int)mpd_song_get_id(song)) {
- seek_id = mpd_song_get_id(song);
+ if (seek_id != (int)mpd_status_get_song_id(c->status)) {
+ seek_id = mpd_status_get_song_id(c->status);
seek_target_time = mpd_status_get_elapsed_time(c->status);
}