diff options
| author | Tim Hobbs <jesus.tesh@gmail.com> | 2014-03-05 04:27:13 -0800 |
|---|---|---|
| committer | Tim Hobbs <jesus.tesh@gmail.com> | 2014-03-05 04:27:13 -0800 |
| commit | 482fde658746750075ff8a562ca1fb88f1739ef4 (patch) | |
| tree | 7bd5084ffa6be20a4533eb37d94f852f2d888a84 /MediaBrowser.ServerApplication/ApplicationHost.cs | |
| parent | 604f971477da4dca5247f7d531323175ad044150 (diff) | |
| parent | 9396f16aed2f304789324afc83e0c9f385c5f00a (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Conflicts:
MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js
Diffstat (limited to 'MediaBrowser.ServerApplication/ApplicationHost.cs')
| -rw-r--r-- | MediaBrowser.ServerApplication/ApplicationHost.cs | 63 |
1 files changed, 60 insertions, 3 deletions
diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs index 73f99cda1..479e07ee6 100644 --- a/MediaBrowser.ServerApplication/ApplicationHost.cs +++ b/MediaBrowser.ServerApplication/ApplicationHost.cs @@ -336,6 +336,51 @@ namespace MediaBrowser.ServerApplication { // Not there, no big deal } + + try + { + Directory.Delete(Path.Combine(ApplicationPaths.DataPath, "fanart-movies"), true); + } + catch (IOException) + { + // Not there, no big deal + } + + try + { + Directory.Delete(Path.Combine(ApplicationPaths.DataPath, "fanart-music"), true); + } + catch (IOException) + { + // Not there, no big deal + } + + try + { + Directory.Delete(Path.Combine(ApplicationPaths.DataPath, "fanart-tv"), true); + } + catch (IOException) + { + // Not there, no big deal + } + + try + { + Directory.Delete(Path.Combine(ApplicationPaths.DataPath, "tmdb-people"), true); + } + catch (IOException) + { + // Not there, no big deal + } + + try + { + Directory.Delete(Path.Combine(ApplicationPaths.DataPath, "tvdb-v3"), true); + } + catch (IOException) + { + // Not there, no big deal + } }); } @@ -812,18 +857,30 @@ namespace MediaBrowser.ServerApplication HasUpdateAvailable = _hasUpdateAvailable, SupportsAutoRunAtStartup = SupportsAutoRunAtStartup, TranscodingTempPath = ApplicationPaths.TranscodingTempPath, - IsRunningAsService = IsRunningAsService + IsRunningAsService = IsRunningAsService, + ServerName = string.IsNullOrWhiteSpace(ServerConfigurationManager.Configuration.ServerName) ? Environment.MachineName : ServerConfigurationManager.Configuration.ServerName }; } 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; |
