Add setting to auto-run web app when server starts

This commit is contained in:
Luke Pulverenti
2017-12-03 17:14:35 -05:00
parent 70b0dd968f
commit 8717f81bf4
6 changed files with 45 additions and 10 deletions

View File

@@ -35,15 +35,20 @@ namespace Emby.Server.Implementations.EntryPoints
/// </summary>
public void Run()
{
if (!_appHost.CanLaunchWebBrowser)
{
return;
}
if (_appHost.IsFirstRun)
{
BrowserLauncher.OpenDashboardPage("wizardstart.html", _appHost);
}
else if (_config.Configuration.IsStartupWizardCompleted)
else if (_config.Configuration.IsStartupWizardCompleted && _config.Configuration.AutoRunWebApp)
{
var options = ((ApplicationHost)_appHost).StartupOptions;
if (!options.ContainsOption("-service") && !options.ContainsOption("-nobrowser"))
if (!options.ContainsOption("-noautorunwebapp"))
{
BrowserLauncher.OpenDashboardPage("index.html", _appHost);
}