From 6481376b81c52af0b29eea997ce44de0de862ac8 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Mon, 19 Dec 2022 15:21:42 +0100 Subject: Use DistinctBy introduced in .NET 6 --- Emby.Server.Implementations/IO/FileRefresher.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Emby.Server.Implementations/IO/FileRefresher.cs') diff --git a/Emby.Server.Implementations/IO/FileRefresher.cs b/Emby.Server.Implementations/IO/FileRefresher.cs index ec8590929e..0ad81b653c 100644 --- a/Emby.Server.Implementations/IO/FileRefresher.cs +++ b/Emby.Server.Implementations/IO/FileRefresher.cs @@ -133,8 +133,7 @@ namespace Emby.Server.Implementations.IO .Distinct(StringComparer.OrdinalIgnoreCase) .Select(GetAffectedBaseItem) .Where(item => item is not null) - .GroupBy(x => x!.Id) // Removed null values in the previous .Where() - .Select(x => x.First())!; + .DistinctBy(x => x!.Id)!; // Removed null values in the previous .Where() foreach (var item in itemsToRefresh) { -- cgit v1.2.3