aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Dto
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2022-12-19 15:21:42 +0100
committerBond_009 <bond.009@outlook.com>2022-12-19 15:21:42 +0100
commit6481376b81c52af0b29eea997ce44de0de862ac8 (patch)
tree046163c8d357783439f9b849bc07012abf3fd206 /Emby.Server.Implementations/Dto
parent411246e90f19f652168878e0edc703fdc9ff32d9 (diff)
Use DistinctBy introduced in .NET 6
Diffstat (limited to 'Emby.Server.Implementations/Dto')
-rw-r--r--Emby.Server.Implementations/Dto/DtoService.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs
index 0c6c31982e..5103b1fbfb 100644
--- a/Emby.Server.Implementations/Dto/DtoService.cs
+++ b/Emby.Server.Implementations/Dto/DtoService.cs
@@ -574,8 +574,7 @@ namespace Emby.Server.Implementations.Dto
.Where(i => user is null ?
true :
i.IsVisible(user))
- .GroupBy(i => i.Name, StringComparer.OrdinalIgnoreCase)
- .Select(x => x.First())
+ .DistinctBy(x => x.Name, StringComparer.OrdinalIgnoreCase)
.ToDictionary(i => i.Name, StringComparer.OrdinalIgnoreCase);
for (var i = 0; i < people.Count; i++)