diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Udp/UdpServer.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Udp/UdpServer.cs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/MediaBrowser.Server.Implementations/Udp/UdpServer.cs b/MediaBrowser.Server.Implementations/Udp/UdpServer.cs index 91a4940ae..9dbffa922 100644 --- a/MediaBrowser.Server.Implementations/Udp/UdpServer.cs +++ b/MediaBrowser.Server.Implementations/Udp/UdpServer.cs @@ -83,9 +83,7 @@ namespace MediaBrowser.Server.Implementations.Udp private async void RespondToV1Message(string endpoint) { - var info = _appHost.GetSystemInfo(); - - var localAddress = info.LocalAddress; + var localAddress = _appHost.LocalApiUrl; if (!string.IsNullOrEmpty(localAddress)) { @@ -110,15 +108,15 @@ namespace MediaBrowser.Server.Implementations.Udp private async void RespondToV2Message(string endpoint) { - var info = _appHost.GetSystemInfo(); + var localUrl = _appHost.LocalApiUrl; - if (!string.IsNullOrEmpty(info.LocalAddress)) + if (!string.IsNullOrEmpty(localUrl)) { var response = new ServerDiscoveryInfo { - Address = info.LocalAddress, - Id = info.Id, - Name = info.ServerName + Address = localUrl, + Id = _appHost.SystemId, + Name = _appHost.FriendlyName }; await SendAsync(Encoding.UTF8.GetBytes(_json.SerializeToString(response)), endpoint); |
