aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Item/BaseItemRepository.QueryBuilding.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-04-26 17:55:19 +0200
committerShadowghost <Ghost_of_Stone@web.de>2026-04-26 18:53:06 +0200
commitfc866a64e063c9f04df3fab9a00846501c8d2b13 (patch)
tree2d3b040ad903dc0c4205658831c5f66939b1a504 /Jellyfin.Server.Implementations/Item/BaseItemRepository.QueryBuilding.cs
parentf806ae40187ff5d853fff7cdd72709eab39bc9ac (diff)
Remove unnecessary materializations
Diffstat (limited to 'Jellyfin.Server.Implementations/Item/BaseItemRepository.QueryBuilding.cs')
-rw-r--r--Jellyfin.Server.Implementations/Item/BaseItemRepository.QueryBuilding.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.QueryBuilding.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.QueryBuilding.cs
index 12bb1e95d4..02664621d4 100644
--- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.QueryBuilding.cs
+++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.QueryBuilding.cs
@@ -432,8 +432,8 @@ public sealed partial class BaseItemRepository
|| (e.TopParentId.HasValue && f.ItemId == e.TopParentId.Value))));
}
- // Exclude alternate versions and owned non-extra items from counts.
- // Alternate versions have PrimaryVersionId set (pointing to their primary).
+ // Exclude alternate versions (have PrimaryVersionId set) and owned non-extra items.
+ // Extras (trailers, etc.) have OwnerId set but also have ExtraType set — keep those.
if (!filter.IncludeOwnedItems)
{
baseQuery = baseQuery.Where(e => e.PrimaryVersionId == null && (e.OwnerId == null || e.ExtraType != null));