diff options
author | Max Kellermann <max@musicpd.org> | 2021-05-19 08:09:05 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2021-05-19 08:09:05 +0200 |
commit | b2cec7a0a375481d1977c167ca51d45dae1e2850 (patch) | |
tree | bf1c5220b40b878cea588675d08a04f0d14579a9 /src/client | |
parent | 85db2d670443089ed74d0ea389f2c1819542956e (diff) | |
parent | c3f9b38c974c5dc8e8621df680769e20ee361a24 (diff) |
Merge branch 'v0.22.x'
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/Client.hxx | 8 | ||||
-rw-r--r-- | src/client/New.cxx | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/client/Client.hxx b/src/client/Client.hxx index 5ddc87a32..516830669 100644 --- a/src/client/Client.hxx +++ b/src/client/Client.hxx @@ -23,6 +23,7 @@ #include "Message.hxx" #include "command/CommandResult.hxx" #include "command/CommandListBuilder.hxx" +#include "input/LastInputStream.hxx" #include "tag/Mask.hxx" #include "event/FullyBufferedSocket.hxx" #include "event/CoarseTimerEvent.hxx" @@ -90,6 +91,13 @@ public: */ size_t binary_limit = 8192; + /** + * This caches the last "albumart" InputStream instance, to + * avoid repeating the search for each chunk requested by this + * client. + */ + LastInputStream last_album_art; + private: static constexpr size_t MAX_SUBSCRIPTIONS = 16; diff --git a/src/client/New.cxx b/src/client/New.cxx index 75019290f..f9633816c 100644 --- a/src/client/New.cxx +++ b/src/client/New.cxx @@ -44,7 +44,8 @@ Client::Client(EventLoop &_loop, Partition &_partition, partition(&_partition), permission(_permission), uid(_uid), - num(_num) + num(_num), + last_album_art(_loop) { timeout_event.Schedule(client_timeout); } |