diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-08-24 15:53:36 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-24 15:53:36 -0400 |
| commit | 421f506d3f5dcfd020355f2dbc37db3ed6493363 (patch) | |
| tree | 1d9a69d530f59bf261b0fc8a63f2ceb1a1608fd3 /MediaBrowser.Controller/Library/ItemResolveArgs.cs | |
| parent | 2bd37fd2c25cd740f4e9f69c4f9a766b10467ded (diff) | |
| parent | 165069ce6337919ebc824d8cf0ef1ef945835718 (diff) | |
Merge pull request #2841 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Controller/Library/ItemResolveArgs.cs')
| -rw-r--r-- | MediaBrowser.Controller/Library/ItemResolveArgs.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/Library/ItemResolveArgs.cs b/MediaBrowser.Controller/Library/ItemResolveArgs.cs index 963e4b71b..56392eee7 100644 --- a/MediaBrowser.Controller/Library/ItemResolveArgs.cs +++ b/MediaBrowser.Controller/Library/ItemResolveArgs.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; - using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.IO; using MediaBrowser.Model.Configuration; @@ -134,7 +133,14 @@ namespace MediaBrowser.Controller.Library // Not officially supported but in some cases we can handle it. if (item == null) { - item = parent.GetParents().OfType<T>().FirstOrDefault(); + var parents = parent.GetParents(); + foreach (var currentParent in parents) + { + if (currentParent is T) + { + return true; + } + } } return item != null; @@ -167,12 +173,12 @@ namespace MediaBrowser.Controller.Library /// Gets the physical locations. /// </summary> /// <value>The physical locations.</value> - public IEnumerable<string> PhysicalLocations + public string[] PhysicalLocations { get { var paths = string.IsNullOrWhiteSpace(Path) ? new string[] { } : new[] { Path }; - return AdditionalLocations == null ? paths : paths.Concat(AdditionalLocations); + return AdditionalLocations == null ? paths : paths.Concat(AdditionalLocations).ToArray(); } } |
