aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-01-29 18:21:27 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2017-01-29 18:21:27 +0100
commitf9c85e3ef285275b8deac569df90a4e946930b5c (patch)
treea4861fac65bdcbc20e0f1b7299eda7d9ba6b8f2d
parent4cc079b6b63b4a37072e5d408a5fce1988561754 (diff)
downloadnncmpp-f9c85e3ef285275b8deac569df90a4e946930b5c.tar.gz
nncmpp-f9c85e3ef285275b8deac569df90a4e946930b5c.tar.xz
nncmpp-f9c85e3ef285275b8deac569df90a4e946930b5c.zip
Don't show "playing" when we don't know
-rw-r--r--nncmpp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nncmpp.c b/nncmpp.c
index 5051f78..ff673df 100644
--- a/nncmpp.c
+++ b/nncmpp.c
@@ -2534,10 +2534,10 @@ mpd_update_playback_state (void)
g.playlist_version = 0;
const char *state;
- g.state = PLAYER_PLAYING;
+ g.state = PLAYER_STOPPED;
if ((state = str_map_find (map, "state")))
{
- if (!strcmp (state, "stop")) g.state = PLAYER_STOPPED;
+ if (!strcmp (state, "play")) g.state = PLAYER_PLAYING;
if (!strcmp (state, "pause")) g.state = PLAYER_PAUSED;
}
@@ -2627,6 +2627,7 @@ mpd_on_info_response (const struct mpd_response *response,
// TODO: preset an error player state?
str_map_clear (&g.playback_info);
if (!response->success)
+ // TODO: we should print that out visibly (permission errors)
print_debug ("%s: %s",
"retrieving MPD info failed", response->message_text);
else if (!data->len)