Răsfoiți Sursa

Apply review suggestions

Shadowghost 2 ani în urmă
părinte
comite
b725fbe51a

+ 1 - 1
Emby.Dlna/Main/DlnaEntryPoint.cs

@@ -288,7 +288,7 @@ namespace Emby.Dlna.Main
             var bindAddresses = _networkManager
                                     .GetInternalBindAddresses()
                                     .Where(i => i.Address.AddressFamily == AddressFamily.InterNetwork
-                                                || (i.AddressFamily == AddressFamily.InterNetworkV6 && i.Address.ScopeId != 0))
+                                        || (i.AddressFamily == AddressFamily.InterNetworkV6 && i.Address.ScopeId != 0))
                                     .ToList();
 
             if (bindAddresses.Count == 0)

+ 2 - 2
Emby.Server.Implementations/ApplicationHost.cs

@@ -1094,8 +1094,8 @@ namespace Emby.Server.Implementations
             {
                 int? requestPort = request.Host.Port;
                 if (requestPort == null
-                || (requestPort == 80 && string.Equals(request.Scheme, "http", StringComparison.OrdinalIgnoreCase))
-                || (requestPort == 443 && string.Equals(request.Scheme, "https", StringComparison.OrdinalIgnoreCase)))
+                    || (requestPort == 80 && string.Equals(request.Scheme, "http", StringComparison.OrdinalIgnoreCase))
+                    || (requestPort == 443 && string.Equals(request.Scheme, "https", StringComparison.OrdinalIgnoreCase)))
                 {
                     requestPort = -1;
                 }

+ 1 - 1
Emby.Server.Implementations/Net/SocketFactory.cs

@@ -61,7 +61,7 @@ namespace Emby.Server.Implementations.Net
         }
 
         /// <inheritdoc />
-        public ISocket CreateUdpMulticastSocket(IPAddress ipAddress, IPAddress bindIpAddress, int multicastTimeToLive, int localPort)
+        public ISocket CreateUdpMulticastSocket(IPAddress ipAddress, IPAddress? bindIpAddress, int multicastTimeToLive, int localPort)
         {
             ArgumentNullException.ThrowIfNull(ipAddress);
 

+ 1 - 1
tests/Jellyfin.Server.Tests/ParseNetworkTests.cs

@@ -22,7 +22,7 @@ namespace Jellyfin.Server.Tests
                 true,
                 true,
                 new string[] { "192.168.t", "127.0.0.1", "::1", "1234.1232.12.1234" },
-                new IPAddress[] { IPAddress.Loopback, },
+                new IPAddress[] { IPAddress.Loopback },
                 new IPNetwork[] { new IPNetwork(IPAddress.IPv6Loopback, 128) });
 
             data.Add(