mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-15 10:43:30 +01:00
Use DistinctBy introduced in .NET 6
This commit is contained in:
@@ -355,8 +355,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return PhysicalLocations
|
||||
.Where(i => !FileSystem.AreEqual(i, Path))
|
||||
.SelectMany(i => GetPhysicalParents(i, rootChildren))
|
||||
.GroupBy(x => x.Id)
|
||||
.Select(x => x.First());
|
||||
.DistinctBy(x => x.Id);
|
||||
}
|
||||
|
||||
private IEnumerable<Folder> GetPhysicalParents(string path, List<Folder> rootChildren)
|
||||
|
||||
Reference in New Issue
Block a user