Only start internal HTTP server when required, and stop 1 second after last Cantata stream is removed.
BUG: 369
This commit is contained in:
committed by
craig.p.drummond
parent
16b3ed8e25
commit
3a07ab4e6d
@@ -26,7 +26,6 @@
|
||||
#include "localize.h"
|
||||
#include "httpserver.h"
|
||||
#include <QComboBox>
|
||||
#include <QTimer>
|
||||
#include <QNetworkInterface>
|
||||
|
||||
static int isIfaceType(const QNetworkInterface &iface, const QString &prefix)
|
||||
@@ -64,7 +63,6 @@ HttpServerSettings::HttpServerSettings(QWidget *p)
|
||||
{
|
||||
setupUi(this);
|
||||
initInterfaces(httpInterface);
|
||||
updateStatus();
|
||||
}
|
||||
|
||||
void HttpServerSettings::load()
|
||||
@@ -87,14 +85,4 @@ void HttpServerSettings::save()
|
||||
{
|
||||
Settings::self()->saveHttpInterface(httpInterface->itemData(httpInterface->currentIndex()).toString());
|
||||
HttpServer::self()->readConfig();
|
||||
QTimer::singleShot(250, this, SLOT(updateStatus()));
|
||||
}
|
||||
|
||||
void HttpServerSettings::updateStatus()
|
||||
{
|
||||
if (HttpServer::self()->isAlive()) {
|
||||
status->setText(HttpServer::self()->address());
|
||||
} else {
|
||||
status->setText(i18n("Inactive"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user