diff options
| author | Mark Monteiro <marknr.monteiro@protonmail.com> | 2020-02-28 20:49:04 +0100 |
|---|---|---|
| committer | Mark Monteiro <marknr.monteiro@protonmail.com> | 2020-03-11 22:54:54 +0100 |
| commit | 29bad073ebeb10813c6468b6159ce3bd06398134 (patch) | |
| tree | a17f43ec7703d8daf79ebd3561460399b1b68129 /Emby.Server.Implementations | |
| parent | 3f4b9e9a81278c6f5c817036a7ae52b6f70557e4 (diff) | |
Use config setting to decide if web content should be hosted
Also fail server startup if web content is expected but missing
Diffstat (limited to 'Emby.Server.Implementations')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 5 | ||||
| -rw-r--r-- | Emby.Server.Implementations/EntryPoints/StartupWizard.cs | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 789b8724c..8ea188724 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -240,13 +240,10 @@ namespace Emby.Server.Implementations public int HttpsPort { get; private set; } /// <summary> - /// Gets the content root for the webhost. If the webhost is not serving static web content, this will be null. + /// Gets the content root for the webhost. /// </summary> public string ContentRoot { get; private set; } - /// <inheritdoc/> - public bool IsHostingContent => ContentRoot != null; - /// <summary> /// Gets the server configuration manager. /// </summary> diff --git a/Emby.Server.Implementations/EntryPoints/StartupWizard.cs b/Emby.Server.Implementations/EntryPoints/StartupWizard.cs index 6b7e2805b..7c2b3cd5f 100644 --- a/Emby.Server.Implementations/EntryPoints/StartupWizard.cs +++ b/Emby.Server.Implementations/EntryPoints/StartupWizard.cs @@ -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); } |
