Commit: 87629c1cbde34668a8fa0cd50078f5c976fdecaa
Parent: a5d894115b4d640ca55bff2775726d39ead72055
Author: Randy Palamar
Date: Sat, 3 Apr 2021 22:08:14 -0600
use mpd_run_* shortcuts
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/blocks/mpd.c b/blocks/mpd.c
@@ -38,13 +38,11 @@ mpd(struct Block *b)
}
mpd_run_noidle(conn);
- if (mpd_send_status(conn))
- status = mpd_recv_status(conn);
+ status = mpd_run_status(conn);
/* >= covers both PLAY and PAUSE */
if (status && (mpd_status_get_state(status) >= MPD_STATE_PLAY)) {
- mpd_send_current_song(conn);
- song = mpd_recv_song(conn);
+ song = mpd_run_current_song(conn);
snprintf(buf, sizeof(buf), "%s",
mpd_song_get_tag(song, b->u.i, 0));
mpd_song_free(song);