From f1a7d9064063d1cc73a0fe9ed3f1fd9b5f5b5f55 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 4 Nov 2013 11:20:44 -0500 Subject: fix scan stopping and restarting itself multiple times when adding/removing collections --- MediaBrowser.Controller/Entities/Folder.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Controller') diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index a4ba14616..7b335b719 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -1347,12 +1347,14 @@ namespace MediaBrowser.Controller.Entities try { - if (LocationType == LocationType.Remote && string.Equals(Path, path, StringComparison.OrdinalIgnoreCase)) + var locationType = LocationType; + + if (locationType == LocationType.Remote && string.Equals(Path, path, StringComparison.OrdinalIgnoreCase)) { return this; } - - if (LocationType != LocationType.Virtual && ResolveArgs.PhysicalLocations.Contains(path, StringComparer.OrdinalIgnoreCase)) + + if (locationType != LocationType.Virtual && ResolveArgs.PhysicalLocations.Contains(path, StringComparer.OrdinalIgnoreCase)) { return this; } -- cgit v1.2.3