aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Item/BaseItemRepository.TranslateQuery.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-03-30 19:49:36 +0200
committerShadowghost <Ghost_of_Stone@web.de>2026-03-30 21:04:59 +0200
commit6fdfc6a61b705191a23cf05d6648ace5607ab197 (patch)
tree949f2c966de6875ac65db0933484825095f91f76 /Jellyfin.Server.Implementations/Item/BaseItemRepository.TranslateQuery.cs
parentd5f4c624e31d135896561537e9d20c50100cf1ac (diff)
Fix version filters
Diffstat (limited to 'Jellyfin.Server.Implementations/Item/BaseItemRepository.TranslateQuery.cs')
-rw-r--r--Jellyfin.Server.Implementations/Item/BaseItemRepository.TranslateQuery.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.TranslateQuery.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.TranslateQuery.cs
index f7f48278db..c1c7e6cd95 100644
--- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.TranslateQuery.cs
+++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.TranslateQuery.cs
@@ -721,10 +721,10 @@ public sealed partial class BaseItemRepository
}
else if (filter.OwnerIds.Length == 0 && filter.ExtraTypes.Length == 0 && !filter.IncludeOwnedItems)
{
- // Exclude alternate versions from general queries. Alternate versions have
- // OwnerId set (pointing to their primary) but no ExtraType.
- // Extras (trailers, etc.) also have OwnerId but DO have ExtraType set - keep those.
- baseQuery = baseQuery.Where(e => e.OwnerId == null || e.ExtraType != null);
+ // Exclude alternate versions and owned non-extra items from general queries.
+ // Alternate versions have PrimaryVersionId set (pointing to their primary).
+ // Extras (trailers, etc.) have OwnerId set but also have ExtraType set - keep those.
+ baseQuery = baseQuery.Where(e => e.PrimaryVersionId == null && (e.OwnerId == null || e.ExtraType != null));
}
if (filter.OwnerIds.Length > 0)