Fix user data batch query perf

This commit is contained in:
Shadowghost
2026-07-16 14:21:03 +02:00
parent d894a98b79
commit cdf7ce0fc4
@@ -291,8 +291,8 @@ namespace Emby.Server.Implementations.Library
{ {
using var dbContext = _repository.CreateDbContext(); using var dbContext = _repository.CreateDbContext();
withLocalAlternates = dbContext.LinkedChildren withLocalAlternates = dbContext.LinkedChildren
.Where(lc => lc.ChildType == Jellyfin.Database.Implementations.Entities.LinkedChildType.LocalAlternateVersion .Where(lc => lc.ChildType == Jellyfin.Database.Implementations.Entities.LinkedChildType.LocalAlternateVersion)
&& localProbeIds.Contains(lc.ParentId)) .WhereOneOrMany(localProbeIds, lc => lc.ParentId)
.Select(lc => lc.ParentId) .Select(lc => lc.ParentId)
.Distinct() .Distinct()
.ToHashSet(); .ToHashSet();