mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-12 16:46:42 +02:00
Add custom URL prefix for HTTP URLs (#1260)
Co-authored-by: Johannes Pohl <johannes.pohl@badaix.de>
This commit is contained in:
parent
342eda02a0
commit
b5284301c5
4 changed files with 18 additions and 8 deletions
|
@ -541,7 +541,11 @@ void PcmStream::setProperties(const Properties& properties)
|
|||
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;
|
||||
if (server_settings_.http.url_prefix == "") {
|
||||
url << "http://" << server_settings_.http.host << ":" << server_settings_.http.port << "/__image_cache?name=" << md5;
|
||||
} else {
|
||||
url << server_settings_.http.url_prefix << "/__image_cache?name=" << md5;
|
||||
}
|
||||
props.metadata->art_url = url.str();
|
||||
}
|
||||
else if (!props.metadata.has_value() || !props.metadata->art_data.has_value())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue