The Free Software Media System - Server Backend & API
Apply review suggestions
Shadowghoste233a3b074d7
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.csindex 8dc54ecfb2..dd90a89505 100644--- a/Emby.Server.Implementations/ApplicationHost.cs+++ b/Emby.Server.Implementations/ApplicationHost.cs@@ -475,8 +475,8 @@ namespace Emby.Server.Implementations}var networkConfiguration = ConfigurationManager.GetNetworkConfiguration();- HttpPort = networkConfiguration.ServerPortNumberHttp;- HttpsPort = networkConfiguration.ServerPortNumberHttps;+ HttpPort = networkConfiguration.InternalHttpPort;+ HttpsPort = networkConfiguration.InternalHttpsPort;// Safeguard against invalid configurationif (HttpPort == HttpsPort)@@ -785,8 +785,8 @@ namespace Emby.Server.Implementationsif (HttpPort != 0 && HttpsPort != 0){// Need to restart if ports have changed- if (networkConfiguration.ServerPortNumberHttp != HttpPort- || networkConfiguration.ServerPortNumberHttps != HttpsPort)+ if (networkConfiguration.InternalHttpPort != HttpPort+ || networkConfiguration.InternalHttpsPort != HttpsPort){if (ConfigurationManager.Configuration.IsPortAuthorized){diff --git a/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs b/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.csindex 6e23c5f46d..d6da597b8b 100644--- a/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs+++ b/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs@@ -57,8 +57,8 @@ namespace Emby.Server.Implementations.EntryPointsreturn new StringBuilder(32).Append(config.EnableUPnP).Append(Separator)- .Append(config.PublicPortHttp).Append(Separator)- .Append(config.PublicPortHttps).Append(Separator)+ .Append(config.PublicHttpPort).Append(Separator)+ .Append(config.PublicHttpsPort).Append(Separator).Append(_appHost.HttpPort).Append(Separator).Append(_appHost.HttpsPort).Append(Separator).Append(_appHost.ListenWithHttps).Append(Separator)@@ -146,11 +146,11 @@ namespace Emby.Server.Implementations.EntryPointsprivate IEnumerable<Task> CreatePortMaps(INatDevice device){var config = _config.GetNetworkConfiguration();- yield return CreatePortMap(device, _appHost.HttpPort, config.PublicPortHttp);+ yield return CreatePortMap(device, _appHost.HttpPort, config.PublicHttpPort);if (_appHost.ListenWithHttps){- yield return CreatePortMap(device, _appHost.HttpsPort, config.PublicPortHttps);+ yield return CreatePortMap(device, _appHost.HttpsPort, config.PublicHttpsPort);}}diff --git a/Jellyfin.Networking/Configuration/NetworkConfiguration.cs b/Jellyfin.Networking/Configuration/NetworkConfiguration.csindex 90c7718ce2..573c36be79 100644--- a/Jellyfin.Networking/Configuration/NetworkConfiguration.cs+++ b/Jellyfin.Networking/Configuration/NetworkConfiguration.cs@@ -10,12 +10,12 @@ namespace Jellyfin.Networking.Configurationpublic class NetworkConfiguration{/// <summary>- /// The default value for <see cref="ServerPortNumberHttp"/>.+ /// The default value for <see cref="InternalHttpPort"/>./// </summary>public const int DefaultHttpPort = 8096;/// <summary>- /// The default value for <see cref="PublicPortHttps"/> and <see cref="ServerPortNumberHttps"/>.+ /// The default value for <see cref="PublicHttpsPort"/> and <see cref="InternalHttpsPort"/>./// </summary>public const int DefaultHttpsPort = 8920;@@ -79,28 +79,28 @@ namespace Jellyfin.Networking.Configurationpublic string CertificatePassword { get; set; } = string.Empty;/// <summary>- /// Gets or sets the HTTP server port number.+ /// Gets or sets the internal HTTP server port./// </summary>- /// <value>The HTTP server port number.</value>- public int ServerPortNumberHttp { get; set; } = DefaultHttpPort;+ /// <value>The HTTP server port.</value>+ public int InternalHttpPort { get; set; } = DefaultHttpPort;/// <summary>- /// Gets or sets the HTTPS server port number.+ /// Gets or sets the internal HTTPS server port./// </summary>- /// <value>The HTTPS server port number.</value>- public int ServerPortNumberHttps { get; set; } = DefaultHttpsPort;+ /// <value>The HTTPS server port.</value>+ public int InternalHttpsPort { get; set; } = DefaultHttpsPort;/// <summary>- /// Gets or sets the public mapped port.+ /// Gets or sets the public HTTP port./// </summary>- /// <value>The public mapped port.</value>- public int PublicPortHttp { get; set; } = DefaultHttpPort;+ /// <value>The public HTTP port.</value>+ public int PublicHttpPort { get; set; } = DefaultHttpPort;/// <summary>/// Gets or sets the public HTTPS port./// </summary>/// <value>The public HTTPS port.</value>- public int PublicPortHttps { get; set; } = DefaultHttpsPort;+ public int PublicHttpsPort { get; set; } = DefaultHttpsPort;/// <summary>/// Gets or sets a value indicating whether Autodiscovery is enabled.diff --git a/Jellyfin.Server/Migrations/PreStartupRoutines/MigrateNetworkConfiguration.cs b/Jellyfin.Server/Migrations/PreStartupRoutines/MigrateNetworkConfiguration.csindex afcf5436c2..3b32e60437 100644--- a/Jellyfin.Server/Migrations/PreStartupRoutines/MigrateNetworkConfiguration.cs+++ b/Jellyfin.Server/Migrations/PreStartupRoutines/MigrateNetworkConfiguration.cs@@ -57,17 +57,17 @@ public class MigrateNetworkConfiguration : IMigrationRoutinenetworkConfiguration.EnableRemoteAccess = oldNetworkConfiguration.EnableRemoteAccess;networkConfiguration.EnableUPnP = oldNetworkConfiguration.EnableUPnP;networkConfiguration.IgnoreVirtualInterfaces = oldNetworkConfiguration.IgnoreVirtualInterfaces;+ networkConfiguration.InternalHttpPort = oldNetworkConfiguration.HttpServerPortNumber;+ networkConfiguration.InternalHttpsPort = oldNetworkConfiguration.HttpsPortNumber;networkConfiguration.IsRemoteIPFilterBlacklist = oldNetworkConfiguration.IsRemoteIPFilterBlacklist;networkConfiguration.KnownProxies = oldNetworkConfiguration.KnownProxies;networkConfiguration.LocalNetworkAddresses = oldNetworkConfiguration.LocalNetworkAddresses;networkConfiguration.LocalNetworkSubnets = oldNetworkConfiguration.LocalNetworkSubnets;- networkConfiguration.PublicPortHttp = oldNetworkConfiguration.PublicPort;- networkConfiguration.PublicPortHttps = oldNetworkConfiguration.PublicHttpsPort;+ networkConfiguration.PublicHttpPort = oldNetworkConfiguration.PublicPort;+ networkConfiguration.PublicHttpsPort = oldNetworkConfiguration.PublicHttpsPort;networkConfiguration.PublishedServerUriBySubnet = oldNetworkConfiguration.PublishedServerUriBySubnet;networkConfiguration.RemoteIPFilter = oldNetworkConfiguration.RemoteIPFilter;networkConfiguration.RequireHttps = oldNetworkConfiguration.RequireHttps;- networkConfiguration.ServerPortNumberHttp = oldNetworkConfiguration.HttpServerPortNumber;- networkConfiguration.ServerPortNumberHttps = oldNetworkConfiguration.HttpsPortNumber;// Migrate old virtual interface name schemavar oldVirtualInterfaceNames = oldNetworkConfiguration.VirtualInterfaceNames;