Don't show "playing" when we don't know
This commit is contained in:
parent
4cc079b6b6
commit
f9c85e3ef2
5
nncmpp.c
5
nncmpp.c
|
@ -2534,10 +2534,10 @@ mpd_update_playback_state (void)
|
||||||
g.playlist_version = 0;
|
g.playlist_version = 0;
|
||||||
|
|
||||||
const char *state;
|
const char *state;
|
||||||
g.state = PLAYER_PLAYING;
|
g.state = PLAYER_STOPPED;
|
||||||
if ((state = str_map_find (map, "state")))
|
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;
|
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?
|
// TODO: preset an error player state?
|
||||||
str_map_clear (&g.playback_info);
|
str_map_clear (&g.playback_info);
|
||||||
if (!response->success)
|
if (!response->success)
|
||||||
|
// TODO: we should print that out visibly (permission errors)
|
||||||
print_debug ("%s: %s",
|
print_debug ("%s: %s",
|
||||||
"retrieving MPD info failed", response->message_text);
|
"retrieving MPD info failed", response->message_text);
|
||||||
else if (!data->len)
|
else if (!data->len)
|
||||||
|
|
Loading…
Reference in New Issue