fix scan stopping and restarting itself multiple times when adding/removing collections

This commit is contained in:
Luke Pulverenti
2013-11-04 11:20:44 -05:00
parent 4bbe8acb5c
commit f1a7d90640
6 changed files with 103 additions and 106 deletions

View File

@@ -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;
}