diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-11-04 11:20:44 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-11-04 11:20:44 -0500 |
| commit | f1a7d9064063d1cc73a0fe9ed3f1fd9b5f5b5f55 (patch) | |
| tree | 8a6025c4ab086da29aa9da6b24d81d9b8dd68c5d /MediaBrowser.Server.Implementations/Library/LibraryManager.cs | |
| parent | 4bbe8acb5cfc5c4a0c392db71d2858589c8f345f (diff) | |
fix scan stopping and restarting itself multiple times when adding/removing collections
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/LibraryManager.cs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index 1aa9e5b9c..9197328bd 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -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) { |
