Use config setting to decide if web content should be hosted

Also fail server startup if web content is expected but missing
This commit is contained in:
Mark Monteiro
2020-02-28 20:49:04 +01:00
parent 3f4b9e9a81
commit 29bad073eb
4 changed files with 18 additions and 21 deletions

View File

@@ -2,7 +2,9 @@ using System.Threading.Tasks;
using Emby.Server.Implementations.Browser;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Extensions;
using MediaBrowser.Controller.Plugins;
using Microsoft.Extensions.Configuration;
namespace Emby.Server.Implementations.EntryPoints
{
@@ -36,7 +38,7 @@ namespace Emby.Server.Implementations.EntryPoints
return Task.CompletedTask;
}
if (!_appHost.IsHostingContent)
if (_appHost.Resolve<IConfiguration>().IsNoWebContent())
{
BrowserLauncher.OpenSwaggerPage(_appHost);
}