diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2022-12-19 20:13:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-19 20:13:48 +0100 |
| commit | 760b7f8fca95b580ba3c9b77493c22b84e871eca (patch) | |
| tree | 73bb3f1ef72d8dd837cbe1d131fa2c2a99287836 /Emby.Server.Implementations/IO/FileRefresher.cs | |
| parent | f20dee8e0d1160ff9e3fac127ebba66e6ecac5da (diff) | |
| parent | 6481376b81c52af0b29eea997ce44de0de862ac8 (diff) | |
Merge pull request #8922 from Bond-009/distinctby
Use DistinctBy introduced in .NET 6
Diffstat (limited to 'Emby.Server.Implementations/IO/FileRefresher.cs')
| -rw-r--r-- | Emby.Server.Implementations/IO/FileRefresher.cs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/IO/FileRefresher.cs b/Emby.Server.Implementations/IO/FileRefresher.cs index ec8590929..0ad81b653 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) { |
