summaryrefslogtreecommitdiffstats
path: root/src/c_mpdview.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c_mpdview.c')
-rw-r--r--src/c_mpdview.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/c_mpdview.c b/src/c_mpdview.c
index 4b0eece..a00c5d2 100644
--- a/src/c_mpdview.c
+++ b/src/c_mpdview.c
@@ -70,9 +70,10 @@ main
struct mpd_connection* conn;
struct mpd_status* status;
struct mpd_song* song;
+ enum mpd_state state;
+ long read_size;
char buff[BUFF_SIZE];
/* char* uri; */
- enum mpd_state state;
(void)argc;
(void)argv;
@@ -100,7 +101,8 @@ main
song = mpd_recv_song(conn);
mpd_response_finish(conn);
bzero(buff, BUFF_SIZE);
- if (mpd_run_albumart(conn, mpd_song_get_uri(song), 0, buff, BUFF_SIZE) > -1) {
+ read_size = mpd_run_albumart(conn, mpd_song_get_uri(song), 0, buff, BUFF_SIZE);
+ if (read_size > -1) {
write(STDOUT_FILENO, buff, BUFF_SIZE);
}
else {