mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-28 13:58:48 +02:00
Provide cover art over HTTPS
This commit is contained in:
parent
fd5f1ba0e2
commit
58e82ef9e8
1 changed files with 10 additions and 2 deletions
|
@ -543,12 +543,20 @@ void PcmStream::setProperties(const Properties& properties)
|
||||||
std::stringstream url;
|
std::stringstream url;
|
||||||
if (server_settings_.http.url_prefix.empty())
|
if (server_settings_.http.url_prefix.empty())
|
||||||
{
|
{
|
||||||
url << "http://" << server_settings_.http.host << ":" << server_settings_.http.port << "/__image_cache?name=" << md5;
|
std::string proto{"http"};
|
||||||
|
size_t port{server_settings_.http.port};
|
||||||
|
if (server_settings_.http.ssl_enabled)
|
||||||
|
{
|
||||||
|
proto = "https";
|
||||||
|
port = server_settings_.http.ssl_port;
|
||||||
|
}
|
||||||
|
url << proto << "://" << server_settings_.http.host << ":" << port;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
url << server_settings_.http.url_prefix << "/__image_cache?name=" << md5;
|
url << server_settings_.http.url_prefix;
|
||||||
}
|
}
|
||||||
|
url << "/__image_cache?name=" << md5;
|
||||||
props.metadata->art_url = url.str();
|
props.metadata->art_url = url.str();
|
||||||
}
|
}
|
||||||
else if (!props.metadata.has_value() || !props.metadata->art_data.has_value())
|
else if (!props.metadata.has_value() || !props.metadata->art_data.has_value())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue