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

@@ -1430,10 +1430,22 @@ namespace MediaBrowser.Server.Implementations.Library
.OfType<CollectionFolder>()
.Where(i =>
{
var locationType = i.LocationType;
if (locationType == LocationType.Remote || locationType == LocationType.Virtual)
{
return false;
}
if (string.Equals(i.Path, item.Path, StringComparison.OrdinalIgnoreCase))
{
return true;
}
try
{
return i.LocationType != LocationType.Remote && i.LocationType != LocationType.Virtual &&
i.ResolveArgs.PhysicalLocations.Contains(item.Path);
return i.ResolveArgs.PhysicalLocations.Contains(item.Path);
}
catch (IOException ex)
{