Do not return alternate versions by default

This commit is contained in:
Shadowghost
2026-03-30 18:56:31 +02:00
parent 4fe3abdc0e
commit d5f4c624e3

View File

@@ -439,6 +439,13 @@ public sealed partial class BaseItemRepository
|| (e.TopParentId.HasValue && f.ItemId == e.TopParentId.Value))));
}
// Exclude alternate versions from counts. Alternate versions have
// OwnerId set (pointing to their primary) but no ExtraType.
if (!filter.IncludeOwnedItems)
{
baseQuery = baseQuery.Where(e => e.OwnerId == null || e.ExtraType != null);
}
return baseQuery;
}