ease up device discovery

This commit is contained in:
Luke Pulverenti 2015-05-05 19:19:47 -04:00
parent f6a90933a8
commit 2f05af4be4
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,4 @@
using MediaBrowser.Common.Events; using MediaBrowser.Common.Events;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller; using MediaBrowser.Controller;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Dlna; using MediaBrowser.Controller.Dlna;
@ -143,9 +142,12 @@ namespace MediaBrowser.Dlna.Ssdp
args.EndPoint = endPoint; args.EndPoint = endPoint;
args.LocalIp = localIp; args.LocalIp = localIp;
if (!_ssdpHandler.IsSelfNotification(args))
{
TryCreateDevice(args); TryCreateDevice(args);
} }
} }
}
_logger.Info("SSDP listener - Task completed"); _logger.Info("SSDP listener - Task completed");
} }

View File

@ -560,7 +560,7 @@ namespace MediaBrowser.Server.Implementations.IO
/// <returns>Task.</returns> /// <returns>Task.</returns>
private async Task ProcessPathChanges(List<string> paths) private async Task ProcessPathChanges(List<string> paths)
{ {
var itemsToRefresh = paths.Select(Path.GetDirectoryName) var itemsToRefresh = paths
.Select(GetAffectedBaseItem) .Select(GetAffectedBaseItem)
.Where(item => item != null) .Where(item => item != null)
.Distinct() .Distinct()