From a8d1cdefaca1dd0ce3dc6efa63461643e18f6116 Mon Sep 17 00:00:00 2001 From: theguymadmax Date: Sat, 17 Jan 2026 10:05:45 -0500 Subject: [PATCH] Address review comments --- .../Item/BaseItemRepository.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs index f477d8aa8a..600b646023 100644 --- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs +++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs @@ -2633,8 +2633,17 @@ public sealed class BaseItemRepository .GroupBy(e => e.Name!) .ToDictionary( g => g.Key, - g => g.Select(f => DeserializeBaseItem(f)).Cast().ToArray()); + g => g.Select(f => DeserializeBaseItem(f)).Where(dto => dto is not null).Cast().ToArray()); - return artistNames.Where(lookup.ContainsKey).ToDictionary(name => name, name => lookup[name]); + var result = new Dictionary(artistNames.Count); + foreach (var name in artistNames) + { + if (lookup.TryGetValue(name, out var artistArray)) + { + result[name] = artistArray; + } + } + + return result; } }