diff options
| author | Tim Hobbs <jesus.tesh@gmail.com> | 2014-03-20 13:45:33 -0700 |
|---|---|---|
| committer | Tim Hobbs <jesus.tesh@gmail.com> | 2014-03-20 13:45:33 -0700 |
| commit | afa9f14cdb383302862b403fd038b95b5709a6aa (patch) | |
| tree | bdf19f7e5f43d43a0db84c5712e3e2e4e7252ba0 /MediaBrowser.Controller/Entities/CollectionFolder.cs | |
| parent | d5e49f590d8e027a8755ea607bf3caba3ddcc9f1 (diff) | |
| parent | 0d518ebf170eefc29fd164eabcbd8d4152177fee (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'MediaBrowser.Controller/Entities/CollectionFolder.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/CollectionFolder.cs | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/MediaBrowser.Controller/Entities/CollectionFolder.cs b/MediaBrowser.Controller/Entities/CollectionFolder.cs index 6628ffc23..0ce88bee7 100644 --- a/MediaBrowser.Controller/Entities/CollectionFolder.cs +++ b/MediaBrowser.Controller/Entities/CollectionFolder.cs @@ -130,7 +130,6 @@ namespace MediaBrowser.Controller.Entities } private List<LinkedChild> _linkedChildren; - /// <summary> /// Our children are actually just references to the ones in the physical root... /// </summary> @@ -145,21 +144,9 @@ namespace MediaBrowser.Controller.Entities } private List<LinkedChild> GetLinkedChildrenInternal() { - Dictionary<string, string> locationsDicionary; - - try - { - locationsDicionary = PhysicalLocations.Distinct(StringComparer.OrdinalIgnoreCase).ToDictionary(i => i, StringComparer.OrdinalIgnoreCase); - } - catch (IOException ex) - { - Logger.ErrorException("Error getting ResolveArgs for {0}", ex, Path); - return new List<LinkedChild>(); - } - return LibraryManager.RootFolder.Children .OfType<Folder>() - .Where(i => i.Path != null && locationsDicionary.ContainsKey(i.Path)) + .Where(i => i.Path != null && PhysicalLocations.Contains(i.Path, StringComparer.OrdinalIgnoreCase)) .SelectMany(c => c.LinkedChildren) .ToList(); } @@ -177,22 +164,10 @@ namespace MediaBrowser.Controller.Entities private IEnumerable<BaseItem> GetActualChildren() { - Dictionary<string, string> locationsDicionary; - - try - { - locationsDicionary = PhysicalLocations.Distinct(StringComparer.OrdinalIgnoreCase).ToDictionary(i => i, StringComparer.OrdinalIgnoreCase); - } - catch (IOException ex) - { - Logger.ErrorException("Error getting ResolveArgs for {0}", ex, Path); - return new BaseItem[] { }; - } - return LibraryManager.RootFolder.Children .OfType<Folder>() - .Where(i => i.Path != null && locationsDicionary.ContainsKey(i.Path)) + .Where(i => i.Path != null && PhysicalLocations.Contains(i.Path, StringComparer.OrdinalIgnoreCase)) .SelectMany(c => c.Children) .ToList(); } |
