diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-04-06 12:18:18 -0400 |
|---|---|---|
| committer | Luke <luke.pulverenti@gmail.com> | 2016-04-06 12:18:18 -0400 |
| commit | 22e0df5349f4d7aec6a05c6726e9e893782e0770 (patch) | |
| tree | a43a604a2e29a86c78c68e39072790613c7ea61b /MediaBrowser.Server.Implementations/Connect | |
| parent | ab9b6ee7c3c947bab30a7e0a2c0eb22d3c5254a7 (diff) | |
| parent | 0e0398026232dac5b7fe71f0dfac1df854c10282 (diff) | |
Merge pull request #1635 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Server.Implementations/Connect')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Connect/ConnectManager.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs index 9ed67f77ef..e308acef06 100644 --- a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs +++ b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs @@ -62,6 +62,17 @@ namespace MediaBrowser.Server.Implementations.Connect { var address = _config.Configuration.WanDdns; + if (!string.IsNullOrWhiteSpace(address)) + { + try + { + address = new Uri(address).Host; + } + catch + { + } + } + if (string.IsNullOrWhiteSpace(address) && DiscoveredWanIpAddress != null) { if (DiscoveredWanIpAddress.AddressFamily == AddressFamily.InterNetworkV6) @@ -237,8 +248,8 @@ namespace MediaBrowser.Server.Implementations.Connect var postData = new Dictionary<string, string> { - {"name", _appHost.FriendlyName}, - {"url", wanApiAddress}, + {"name", _appHost.FriendlyName}, + {"url", wanApiAddress}, {"systemId", _appHost.SystemId} }; |
