From 8fbfd49758af71908640c7430fc0417bdaa9855d Mon Sep 17 00:00:00 2001 From: Joe Date: Sun, 3 Jul 2022 04:07:46 +0200 Subject: WIP --- src/c_mpdview.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/c_mpdview.c') diff --git a/src/c_mpdview.c b/src/c_mpdview.c index a00c5d2..0a356fc 100644 --- a/src/c_mpdview.c +++ b/src/c_mpdview.c @@ -71,9 +71,8 @@ main struct mpd_status* status; struct mpd_song* song; enum mpd_state state; - long read_size; + int read_size; char buff[BUFF_SIZE]; - /* char* uri; */ (void)argc; (void)argv; @@ -103,7 +102,7 @@ main bzero(buff, BUFF_SIZE); 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); + write(STDOUT_FILENO, buff, read_size); } else { dprintf(STDOUT_FILENO, "Exit\n"); -- cgit v1.2.3