diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-01-02 16:21:06 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-01-02 16:21:06 -0500 |
| commit | 1e88b1ef9f6335a2363bd32221a0e016fdd8b0c0 (patch) | |
| tree | 40572c096c245024ce76b2f79f6e0ea192f94ae2 /MediaBrowser.ServerApplication/ApplicationHost.cs | |
| parent | e80cbe5b64fa85a814e8e3009c28b1853dc23988 (diff) | |
web client touchups
Diffstat (limited to 'MediaBrowser.ServerApplication/ApplicationHost.cs')
| -rw-r--r-- | MediaBrowser.ServerApplication/ApplicationHost.cs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs index fc1319136..151aedd27 100644 --- a/MediaBrowser.ServerApplication/ApplicationHost.cs +++ b/MediaBrowser.ServerApplication/ApplicationHost.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Api; +using System.Globalization; +using MediaBrowser.Api; using MediaBrowser.Common; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Constants; @@ -627,10 +628,23 @@ namespace MediaBrowser.ServerApplication OperatingSystem = Environment.OSVersion.ToString(), CanSelfRestart = CanSelfRestart, CanSelfUpdate = CanSelfUpdate, - WanAddress = WanAddressEntryPoint.WanAddress + WanAddress = GetWanAddress() }; } + private readonly CultureInfo _usCulture = new CultureInfo("en-US"); + private string GetWanAddress() + { + var ip = WanAddressEntryPoint.WanAddress; + + if (!string.IsNullOrEmpty(ip)) + { + return "http://" + ip + ":" + ServerConfigurationManager.Configuration.HttpServerPortNumber.ToString(_usCulture); + } + + return null; + } + /// <summary> /// Gets the mac address. /// </summary> |
