diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-04 21:59:59 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-04 21:59:59 -0500 |
| commit | 9396f16aed2f304789324afc83e0c9f385c5f00a (patch) | |
| tree | 7bd5084ffa6be20a4533eb37d94f852f2d888a84 /MediaBrowser.ServerApplication/ApplicationHost.cs | |
| parent | 040c36dbf22a4175686bbf0a7824f698a764ab8b (diff) | |
add more reporting data
Diffstat (limited to 'MediaBrowser.ServerApplication/ApplicationHost.cs')
| -rw-r--r-- | MediaBrowser.ServerApplication/ApplicationHost.cs | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs index 1907344a1..479e07ee6 100644 --- a/MediaBrowser.ServerApplication/ApplicationHost.cs +++ b/MediaBrowser.ServerApplication/ApplicationHost.cs @@ -372,6 +372,15 @@ namespace MediaBrowser.ServerApplication { // Not there, no big deal } + + try + { + Directory.Delete(Path.Combine(ApplicationPaths.DataPath, "tvdb-v3"), true); + } + catch (IOException) + { + // Not there, no big deal + } }); } @@ -856,11 +865,22 @@ namespace MediaBrowser.ServerApplication private readonly CultureInfo _usCulture = new CultureInfo("en-US"); private string GetWanAddress() { - var ip = WanAddressEntryPoint.WanAddress; + var ip = ServerConfigurationManager.Configuration.WanDdns; + + if (string.IsNullOrWhiteSpace(ip)) + { + ip = WanAddressEntryPoint.WanAddress; + } if (!string.IsNullOrEmpty(ip)) { - return "http://" + ip + ":" + ServerConfigurationManager.Configuration.HttpServerPortNumber.ToString(_usCulture); + if (!ip.StartsWith("http://", StringComparison.OrdinalIgnoreCase) && + !ip.StartsWith("https://", StringComparison.OrdinalIgnoreCase)) + { + ip = "http://" + ip; + } + + return ip + ":" + ServerConfigurationManager.Configuration.HttpServerPortNumber.ToString(_usCulture); } return null; |
