diff options
author | Max Kellermann <max@musicpd.org> | 2019-08-12 14:17:35 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-08-12 14:17:35 +0200 |
commit | 989790e7f172cf74c3adabb8971f62ba0311ab3a (patch) | |
tree | f7986cd4e1c2bb01e63887ec9d423c2b97b0eb23 /src/command | |
parent | 831bc711ca88b4b243b2a09384ecb31a03cdcc93 (diff) |
client/Response: add method WriteBinary()
Move code from read_stream_art().
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/FileCommands.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/command/FileCommands.cxx b/src/command/FileCommands.cxx index 97b5d89fe..5de92a721 100644 --- a/src/command/FileCommands.cxx +++ b/src/command/FileCommands.cxx @@ -296,14 +296,8 @@ read_stream_art(Response &r, const char *uri, size_t offset) read_size = is->Read(lock, &buffer, CHUNK_SIZE); } - r.Format("size: %" PRIoffset "\n" - "binary: %u\n", - art_file_size, - read_size - ); - - r.Write(buffer, read_size); - r.Write("\n"); + r.Format("size: %" PRIoffset "\n", art_file_size); + r.WriteBinary({buffer, read_size}); return CommandResult::OK; } |