mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
update ssdp handling
This commit is contained in:
parent
cc6680f48f
commit
7177512a45
@ -15,6 +15,7 @@ using MediaBrowser.Model.Logging;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Controller.MediaEncoding;
|
using MediaBrowser.Controller.MediaEncoding;
|
||||||
using Rssdp;
|
using Rssdp;
|
||||||
@ -220,9 +221,11 @@ namespace MediaBrowser.Dlna.Main
|
|||||||
}
|
}
|
||||||
|
|
||||||
var cacheLength = _config.GetDlnaConfiguration().BlastAliveMessageIntervalSeconds * 2;
|
var cacheLength = _config.GetDlnaConfiguration().BlastAliveMessageIntervalSeconds * 2;
|
||||||
_Publisher.SupportPnpRootDevice = true;
|
_Publisher.SupportPnpRootDevice = false;
|
||||||
|
|
||||||
foreach (var address in await _appHost.GetLocalIpAddresses().ConfigureAwait(false))
|
var addresses = (await _appHost.GetLocalIpAddresses().ConfigureAwait(false)).ToList();
|
||||||
|
|
||||||
|
foreach (var address in addresses)
|
||||||
{
|
{
|
||||||
//if (IPAddress.IsLoopback(address))
|
//if (IPAddress.IsLoopback(address))
|
||||||
//{
|
//{
|
||||||
@ -334,17 +337,11 @@ namespace MediaBrowser.Dlna.Main
|
|||||||
{
|
{
|
||||||
var devices = _Publisher.Devices.ToList();
|
var devices = _Publisher.Devices.ToList();
|
||||||
|
|
||||||
Parallel.ForEach(devices, device =>
|
foreach (var device in devices)
|
||||||
{
|
{
|
||||||
try
|
var task = _Publisher.RemoveDevice(device);
|
||||||
{
|
Task.WaitAll(task);
|
||||||
_Publisher.RemoveDevice(device);
|
}
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.ErrorException("Error sending bye bye", ex);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//foreach (var device in devices)
|
//foreach (var device in devices)
|
||||||
//{
|
//{
|
||||||
// try
|
// try
|
||||||
|
Loading…
x
Reference in New Issue
Block a user