aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/CollectionFolder.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2019-02-02 12:27:06 +0100
committerBond_009 <bond.009@outlook.com>2019-02-02 12:27:06 +0100
commit1385d89df6d6af178dcfdfa1dee6346c6efcad2a (patch)
treed04c9666c3e9eed90e9c6c8a4832b03af49ceceb /MediaBrowser.Controller/Entities/CollectionFolder.cs
parent8b073e2ba5e4b1dafc7ef11554cd13ef59339a5c (diff)
Remove MoreLINQ
Diffstat (limited to 'MediaBrowser.Controller/Entities/CollectionFolder.cs')
-rw-r--r--MediaBrowser.Controller/Entities/CollectionFolder.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Entities/CollectionFolder.cs b/MediaBrowser.Controller/Entities/CollectionFolder.cs
index 91cfcd0ce..275052d48 100644
--- a/MediaBrowser.Controller/Entities/CollectionFolder.cs
+++ b/MediaBrowser.Controller/Entities/CollectionFolder.cs
@@ -335,7 +335,11 @@ namespace MediaBrowser.Controller.Entities
.OfType<Folder>()
.ToList();
- return PhysicalLocations.Where(i => !FileSystem.AreEqual(i, Path)).SelectMany(i => GetPhysicalParents(i, rootChildren)).DistinctBy(i => i.Id);
+ return PhysicalLocations
+ .Where(i => !FileSystem.AreEqual(i, Path))
+ .SelectMany(i => GetPhysicalParents(i, rootChildren))
+ .GroupBy(x => x.Id)
+ .Select(x => x.First());
}
private IEnumerable<Folder> GetPhysicalParents(string path, List<Folder> rootChildren)