http: make HTTP server support configurable

This allows to configure the local files streaming option
per-connection. It defaults to enabled.
This commit is contained in:
Jonas Wielicki
2017-10-15 13:57:30 +02:00
parent 832d81dd10
commit e4a18332a0
6 changed files with 35 additions and 1 deletions

View File

@@ -71,6 +71,12 @@ HttpServer::HttpServer()
connect(MPDConnection::self(), SIGNAL(ifaceIp(QString)), this, SLOT(ifaceIp(QString)));
}
bool HttpServer::isAlive() const
{
// started on demand, but only start if allowed
return Settings::self()->connectionDetails().allowLocalStreaming;
}
bool HttpServer::start()
{
if (closeTimer) {