diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-04-24 23:54:48 +0100 |
|---|---|---|
| committer | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-04-26 17:13:45 +0100 |
| commit | 5741fa7dfa4b1e8e8cb1f977a7eb531b994b93ae (patch) | |
| tree | e00da3e6f0b2ac65047f9ddf7ff75e21b1cf78aa /Emby.Server.Implementations/ApplicationHost.cs | |
| parent | 224c48821e8a1528d35bef0222c729ba2604521d (diff) | |
Fix url for LiveTV
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 703f8d20d..7b4592fbc 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -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/> |
