Skip to content

The Free Software Media System - Server Backend & API

Merge branch 'master' into NetworkPR2

BaronGreenbackd66f88672cdc
diff --cc Emby.Dlna/Main/DlnaEntryPoint.cs
index be618be2b3,f8a00efaca..463ed8d67a
--- a/Emby.Dlna/Main/DlnaEntryPoint.cs
+++ b/Emby.Dlna/Main/DlnaEntryPoint.cs
@@@ -257,21 -255,14 +257,24 @@@ namespace Emby.Dlna.Mai
}
}
- private async Task RegisterServerEndpoints()
+ private void RegisterServerEndpoints()
{
+ var addresses = await _appHost.GetLocalIpAddresses().ConfigureAwait(false);
+
var udn = CreateUuid(_appHost.SystemId);
+ var descriptorUri = "/dlna/" + udn + "/description.xml";
- foreach (var address in addresses)
+ var bindAddresses = NetworkManager.CreateCollection(
+ _networkManager.GetInternalBindAddresses()
+ .Where(i => i.AddressFamily == AddressFamily.InterNetwork || (i.AddressFamily == AddressFamily.InterNetworkV6 && i.Address.ScopeId != 0)));
+
+ if (bindAddresses.Count == 0)
+ {
+ // No interfaces returned, so use loopback.
+ bindAddresses = _networkManager.GetLoopbacks();
+ }
+
+ foreach (IPNetAddress address in bindAddresses)
{
if (address.AddressFamily == AddressFamily.InterNetworkV6)
{
diff --cc Emby.Server.Implementations/ApplicationHost.cs
index 7f088ef0cb,ad3c196189..18fcb39c20
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@@ -506,25 -492,10 +503,10 @@@ namespace Emby.Server.Implementation
// Safeguard against invalid configuration
if (HttpPort == HttpsPort)
{
- HttpPort = ServerConfiguration.DefaultHttpPort;
- HttpsPort = ServerConfiguration.DefaultHttpsPort;
+ HttpPort = NetworkConfiguration.DefaultHttpPort;
+ HttpsPort = NetworkConfiguration.DefaultHttpsPort;
}
- if (Plugins != null)
- {
- var pluginBuilder = new StringBuilder();
-
- foreach (var plugin in Plugins)
- {
- pluginBuilder.Append(plugin.Name)
- .Append(' ')
- .Append(plugin.Version)
- .AppendLine();
- }
-
- Logger.LogInformation("Plugins: {Plugins}", pluginBuilder.ToString());
- }
-
DiscoverTypes();
RegisterServices();
diff --cc MediaBrowser.Common/Configuration/IConfigurationManager.cs
index 17520f8a37,fc63d93503..4c2b3a742a
--- a/MediaBrowser.Common/Configuration/IConfigurationManager.cs
+++ b/MediaBrowser.Common/Configuration/IConfigurationManager.cs
@@@ -50,8 -50,14 +50,12 @@@ namespace MediaBrowser.Common.Configura
/// Manually pre-loads a factory so that it is available pre system initialisation.
/// </summary>
/// <typeparam name="T">Class to register.</typeparam>
- void RegisterConfiguration<T>();
+ void RegisterConfiguration<T>()
+ where T : IConfigurationFactory;
+ /// <summary>
+ /// Gets the configuration.
+ /// </summary>
- /// <param name="key">The key.</param>
- /// <returns>System.Object.</returns>
object GetConfiguration(string key);
/// <summary>