aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs3
-rw-r--r--Emby.Server.Implementations/Browser/BrowserLauncher.cs10
-rw-r--r--Emby.Server.Implementations/EntryPoints/StartupWizard.cs6
3 files changed, 18 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index a5b88f64f2..789b8724c3 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -244,6 +244,9 @@ namespace Emby.Server.Implementations
/// </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/Browser/BrowserLauncher.cs b/Emby.Server.Implementations/Browser/BrowserLauncher.cs
index f5da0d0183..b17c2b2700 100644
--- a/Emby.Server.Implementations/Browser/BrowserLauncher.cs
+++ b/Emby.Server.Implementations/Browser/BrowserLauncher.cs
@@ -30,6 +30,16 @@ namespace Emby.Server.Implementations.Browser
}
/// <summary>
+ /// Opens the swagger API page.
+ /// </summary>
+ /// <param name="appHost">The app host.</param>
+ public static void OpenSwaggerPage(IServerApplicationHost appHost)
+ {
+ var url = appHost.GetLocalApiUrl("localhost") + "/swagger/index.html";
+ OpenUrl(appHost, url);
+ }
+
+ /// <summary>
/// Opens the URL.
/// </summary>
/// <param name="appHost">The application host instance.</param>
diff --git a/Emby.Server.Implementations/EntryPoints/StartupWizard.cs b/Emby.Server.Implementations/EntryPoints/StartupWizard.cs
index 5f2d629fea..6b7e2805bd 100644
--- a/Emby.Server.Implementations/EntryPoints/StartupWizard.cs
+++ b/Emby.Server.Implementations/EntryPoints/StartupWizard.cs
@@ -36,7 +36,11 @@ namespace Emby.Server.Implementations.EntryPoints
return Task.CompletedTask;
}
- if (!_config.Configuration.IsStartupWizardCompleted)
+ if (!_appHost.IsHostingContent)
+ {
+ BrowserLauncher.OpenSwaggerPage(_appHost);
+ }
+ else if (!_config.Configuration.IsStartupWizardCompleted)
{
BrowserLauncher.OpenWebApp(_appHost);
}