diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-04-02 18:04:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-02 18:04:49 +0200 |
| commit | b3283e37f2ec1ee106bc135502f37f96f32954be (patch) | |
| tree | ea26b3a33d815f53b079382fa27cbf779233c18c /Emby.Server.Implementations/ApplicationHost.cs | |
| parent | 108172c00f822df994b3a27bbc5536ffdcbed09e (diff) | |
| parent | bece62fd5c9a2dfe9edbe4fcf944c16b87569f92 (diff) | |
Merge pull request #2740 from JustAMan/fix-livetv
Fix GetLocalApiUrl for cases with https enabled
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index ef5f2966d..c959cc974 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1509,18 +1509,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) |
