Commit: 488a3fe6462590e18d2d16b0af64120be31a6af3
Parent: cad1a6904c3178f28a2c938c751897d853facdf0
Author: opask
Date: Sat, 10 Nov 2018 17:56:57 -0700
increase timeout time for mpd and show info when song is paused
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/status.c b/status.c
@@ -110,7 +110,7 @@ mpd(enum mpd_tag_type type)
struct mpd_status *status = NULL;
char *ret = NULL;
- conn = mpd_connection_new("localhost", 0, 60);
+ conn = mpd_connection_new("localhost", 0, 600);
if (!conn || mpd_connection_get_error(conn))
return smprintf("");
@@ -121,7 +121,8 @@ mpd(enum mpd_tag_type type)
status = mpd_recv_status(conn);
- if (status && (mpd_status_get_state(status) == MPD_STATE_PLAY)) {
+ /* >= covers both PLAY and PAUSE */
+ if (status && (mpd_status_get_state(status) >= MPD_STATE_PLAY)) {
mpd_response_next(conn);
song = mpd_recv_song(conn);
ret = smprintf("%s", mpd_song_get_tag(song, type, 0));