mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-31 12:58:28 +01:00
Large number of files
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Jellyfin.Networking\Jellyfin.Networking.csproj" />
|
||||
<ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Jellyfin.Networking.Manager;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Model.Net;
|
||||
using Microsoft.Extensions.Logging;
|
||||
@@ -352,7 +353,7 @@ namespace Rssdp.Infrastructure
|
||||
|
||||
if (_enableMultiSocketBinding)
|
||||
{
|
||||
foreach (var address in _networkManager.GetLocalIpAddresses())
|
||||
foreach (var address in _networkManager.GetAllBindInterfaces())
|
||||
{
|
||||
if (address.AddressFamily == AddressFamily.InterNetworkV6)
|
||||
{
|
||||
@@ -362,7 +363,7 @@ namespace Rssdp.Infrastructure
|
||||
|
||||
try
|
||||
{
|
||||
sockets.Add(_SocketFactory.CreateSsdpUdpSocket(address, _LocalPort));
|
||||
sockets.Add(_SocketFactory.CreateSsdpUdpSocket(address.Address, _LocalPort));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,9 @@ using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Jellyfin.Networking.Manager;
|
||||
using MediaBrowser.Common.Net;
|
||||
using NetworkCollection;
|
||||
|
||||
namespace Rssdp.Infrastructure
|
||||
{
|
||||
@@ -300,17 +302,14 @@ namespace Rssdp.Infrastructure
|
||||
|
||||
foreach (var device in deviceList)
|
||||
{
|
||||
if (!_sendOnlyMatchedHost ||
|
||||
_networkManager.IsInSameSubnet(device.ToRootDevice().Address, remoteEndPoint.Address, device.ToRootDevice().SubnetMask))
|
||||
var ip1 = new IPNetAddress(device.ToRootDevice().Address, device.ToRootDevice().SubnetMask);
|
||||
var ip2 = new IPNetAddress(remoteEndPoint.Address, device.ToRootDevice().SubnetMask);
|
||||
if (!_sendOnlyMatchedHost || ip1.NetworkAddress.Equals(ip2.NetworkAddress))
|
||||
{
|
||||
SendDeviceSearchResponses(device, remoteEndPoint, receivedOnlocalIpAddress, cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// WriteTrace(String.Format("Sending 0 search responses."));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user