Fix url for LiveTV

This commit is contained in:
BaronGreenback
2021-04-24 23:54:48 +01:00
parent 224c48821e
commit 5741fa7dfa
4 changed files with 52 additions and 7 deletions

View File

@@ -1203,12 +1203,8 @@ namespace Emby.Server.Implementations
/// <inheritdoc/>
public string GetLoopbackHttpApiUrl()
{
if (NetManager.IsIP6Enabled)
{
return GetLocalApiUrl("::1", Uri.UriSchemeHttp, HttpPort);
}
return GetLocalApiUrl("127.0.0.1", Uri.UriSchemeHttp, HttpPort);
// Passing an external address cause GetBindInterface to return an externally accessible interface (if possible).
return GetLocalApiUrl(NetManager.GetBindInterface("8.8.8.8", out var _), Uri.UriSchemeHttp, HttpPort);
}
/// <inheritdoc/>