mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-12 00:26:41 +02:00
Remove ImageCache instance from ServerSettings
This commit is contained in:
parent
2530a347c2
commit
78cbd3cf5b
6 changed files with 20 additions and 12 deletions
|
@ -28,6 +28,7 @@
|
|||
#include "common/utils/string_utils.hpp"
|
||||
#include "control_error.hpp"
|
||||
#include "encoder/encoder_factory.hpp"
|
||||
#include "image_cache.hpp"
|
||||
|
||||
// 3rd party headers
|
||||
#include <boost/asio/ip/host_name.hpp>
|
||||
|
@ -537,7 +538,7 @@ void PcmStream::setProperties(const Properties& properties)
|
|||
if (props.metadata.has_value() && props.metadata->art_data.has_value() && !props.metadata->art_url.has_value())
|
||||
{
|
||||
auto data = base64_decode(props.metadata->art_data->data);
|
||||
auto md5 = ServerSettings::Http::image_cache.setImage(getName(), std::move(data), props.metadata->art_data->extension);
|
||||
auto md5 = ImageCache::instance().setImage(getName(), std::move(data), props.metadata->art_data->extension);
|
||||
|
||||
std::stringstream url;
|
||||
url << "http://" << server_settings_.http.host << ":" << server_settings_.http.port << "/__image_cache?name=" << md5;
|
||||
|
@ -545,7 +546,7 @@ void PcmStream::setProperties(const Properties& properties)
|
|||
}
|
||||
else if (!props.metadata.has_value() || !props.metadata->art_data.has_value())
|
||||
{
|
||||
ServerSettings::Http::image_cache.clear(getName());
|
||||
ImageCache::instance().clear(getName());
|
||||
}
|
||||
|
||||
if (props == properties_)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue