Merge pull request #2740 from JustAMan/fix-livetv

Fix GetLocalApiUrl for cases with https enabled

(cherry picked from commit b3283e37f2ec1ee106bc135502f37f96f32954be)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
Bond-009 2020-04-02 18:04:49 +02:00 committed by Joshua M. Boniface
parent 7059761806
commit 3a4cd01b13

View File

@ -1517,18 +1517,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)