diff options
author | Joe <bousset.rudy@gmail.com> | 2022-07-03 04:07:46 +0200 |
---|---|---|
committer | Joe <bousset.rudy@gmail.com> | 2022-07-03 04:07:46 +0200 |
commit | 8fbfd49758af71908640c7430fc0417bdaa9855d (patch) | |
tree | 78f4dddf1b83af9f7bad49348223abe328068d31 | |
parent | WIP (diff) | |
download | mpdview-8fbfd49758af71908640c7430fc0417bdaa9855d.tar.gz mpdview-8fbfd49758af71908640c7430fc0417bdaa9855d.tar.bz2 mpdview-8fbfd49758af71908640c7430fc0417bdaa9855d.tar.xz mpdview-8fbfd49758af71908640c7430fc0417bdaa9855d.tar.zst mpdview-8fbfd49758af71908640c7430fc0417bdaa9855d.zip |
WIP
-rw-r--r-- | src/c_mpdview.c | 5 |
1 files changed, 2 insertions, 3 deletions
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"); |