diff options
| author | Mark Monteiro <marknr.monteiro@protonmail.com> | 2020-05-10 18:07:56 -0400 |
|---|---|---|
| committer | Mark Monteiro <marknr.monteiro@protonmail.com> | 2020-05-10 18:07:56 -0400 |
| commit | 3abf870c1e321dbeb484e4e255000a27760d7bc9 (patch) | |
| tree | 3409419abefa1aec0f7774f9152527f4a7a69c63 /Emby.Server.Implementations/Browser | |
| parent | dc5165b97fdd1342d4673ba1a30d44198327c314 (diff) | |
Do not include a double slash in URLs when a base URL is not set
Diffstat (limited to 'Emby.Server.Implementations/Browser')
| -rw-r--r-- | Emby.Server.Implementations/Browser/BrowserLauncher.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/Browser/BrowserLauncher.cs b/Emby.Server.Implementations/Browser/BrowserLauncher.cs index ccb733b3c..7f7c6a0be 100644 --- a/Emby.Server.Implementations/Browser/BrowserLauncher.cs +++ b/Emby.Server.Implementations/Browser/BrowserLauncher.cs @@ -31,18 +31,18 @@ namespace Emby.Server.Implementations.Browser /// Opens the specified URL in an external browser window. Any exceptions will be logged, but ignored. /// </summary> /// <param name="appHost">The application host.</param> - /// <param name="url">The URL.</param> - private static void TryOpenUrl(IServerApplicationHost appHost, string url) + /// <param name="relativeUrl">The URL to open, relative to the server base URL.</param> + private static void TryOpenUrl(IServerApplicationHost appHost, string relativeUrl) { try { - Uri baseUrl = appHost.GetLocalApiUrl("localhost"); - appHost.LaunchUrl(baseUrl + url); + string baseUrl = appHost.GetLocalApiUrl("localhost"); + appHost.LaunchUrl(baseUrl + relativeUrl); } catch (Exception ex) { var logger = appHost.Resolve<ILogger>(); - logger?.LogError(ex, "Failed to open browser window with URL {URL}", url); + logger?.LogError(ex, "Failed to open browser window with URL {URL}", relativeUrl); } } } |
