Fix GetLocalApiUrl for cases with https enabled

This should fix LiveTV and tuners
This commit is contained in:
Vasily 2020-04-02 13:40:48 +03:00
parent cc40f84f3c
commit bece62fd5c

View File

@ -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)