diff options
Diffstat (limited to 'MediaBrowser.Server.Startup.Common/ApplicationHost.cs')
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/ApplicationHost.cs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs index a54380850..269c30669 100644 --- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs +++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs @@ -97,6 +97,7 @@ using System.Globalization; using System.IO; using System.Linq; using System.Net; +using System.Net.Sockets; using System.Reflection; using System.Threading; using System.Threading.Tasks; @@ -322,7 +323,7 @@ namespace MediaBrowser.Server.Startup.Common { TaskManager.SuspendTriggers = true; } - + await base.RunStartupTasks().ConfigureAwait(false); Logger.Info("ServerId: {0}", SystemId); @@ -374,6 +375,7 @@ namespace MediaBrowser.Server.Startup.Common var migrations = new List<IVersionMigration> { new OmdbEpisodeProviderMigration(ServerConfigurationManager), + new MovieDbEpisodeProviderMigration(ServerConfigurationManager), new DbMigration(ServerConfigurationManager, TaskManager) }; @@ -1133,7 +1135,7 @@ namespace MediaBrowser.Server.Startup.Common if (address != null) { - return GetLocalApiUrl(address.ToString()); + return GetLocalApiUrl(address); } return null; @@ -1147,6 +1149,16 @@ namespace MediaBrowser.Server.Startup.Common } } + public string GetLocalApiUrl(IPAddress ipAddress) + { + if (ipAddress.AddressFamily == AddressFamily.InterNetworkV6) + { + return GetLocalApiUrl("[" + ipAddress + "]"); + } + + return GetLocalApiUrl(ipAddress.ToString()); + } + public string GetLocalApiUrl(string host) { return string.Format("http://{0}:{1}", @@ -1179,7 +1191,7 @@ namespace MediaBrowser.Server.Startup.Common return true; } - var apiUrl = GetLocalApiUrl(address.ToString()); + var apiUrl = GetLocalApiUrl(address); apiUrl += "/system/ping"; if ((DateTime.UtcNow - _lastAddressCacheClear).TotalMinutes >= 5) |
