From 2f05af4be4ffb1ea8ed5421a39963372ca5c7f18 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 5 May 2015 19:19:47 -0400 Subject: [PATCH] ease up device discovery --- MediaBrowser.Dlna/Ssdp/DeviceDiscovery.cs | 6 ++++-- MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Dlna/Ssdp/DeviceDiscovery.cs b/MediaBrowser.Dlna/Ssdp/DeviceDiscovery.cs index 737eb4287..94342bf31 100644 --- a/MediaBrowser.Dlna/Ssdp/DeviceDiscovery.cs +++ b/MediaBrowser.Dlna/Ssdp/DeviceDiscovery.cs @@ -1,5 +1,4 @@ using MediaBrowser.Common.Events; -using MediaBrowser.Common.Net; using MediaBrowser.Controller; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Dlna; @@ -143,7 +142,10 @@ namespace MediaBrowser.Dlna.Ssdp args.EndPoint = endPoint; args.LocalIp = localIp; - TryCreateDevice(args); + if (!_ssdpHandler.IsSelfNotification(args)) + { + TryCreateDevice(args); + } } } diff --git a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs index 3d6a6c2f1..2d4770fac 100644 --- a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs +++ b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs @@ -560,7 +560,7 @@ namespace MediaBrowser.Server.Implementations.IO /// Task. private async Task ProcessPathChanges(List paths) { - var itemsToRefresh = paths.Select(Path.GetDirectoryName) + var itemsToRefresh = paths .Select(GetAffectedBaseItem) .Where(item => item != null) .Distinct()