aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasily <just.one.man@yandex.ru>2020-04-02 13:40:48 +0300
committerVasily <just.one.man@yandex.ru>2020-04-02 13:40:48 +0300
commitbece62fd5c9a2dfe9edbe4fcf944c16b87569f92 (patch)
treeb00be4687690e00fa3d17508863819914a903f87
parentcc40f84f3c138e439318e400eeb53cbb74eb8a84 (diff)
Fix GetLocalApiUrl for cases with https enabled
This should fix LiveTV and tuners
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs14
1 files changed, 3 insertions, 11 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 4fbc933a8..7055e2164 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -1507,18 +1507,10 @@ namespace Emby.Server.Implementations
public string GetLocalApiUrl(ReadOnlySpan<char> host)
{
var url = new StringBuilder(64);
- if (EnableHttps)
- {
- url.Append("https://");
- }
- else
- {
- url.Append("http://");
- }
-
- url.Append(host)
+ url.Append(EnableHttps ? "https://" : "http://")
+ .Append(host)
.Append(':')
- .Append(HttpPort);
+ .Append(EnableHttps ? HttpsPort : HttpPort);
string baseUrl = ServerConfigurationManager.Configuration.BaseUrl;
if (baseUrl.Length != 0)