Merge remote-tracking branch 'upstream/master' into search-rebased

This commit is contained in:
Shadowghost
2026-05-24 18:25:12 +02:00
211 changed files with 1529 additions and 2484 deletions

View File

@@ -1020,6 +1020,15 @@ public sealed partial class BaseItemRepository
baseQuery = baseQuery.Where(e => e.Parents!.AsQueryable().Any(ancestorFilter));
}
if (filter.LinkedChildAncestorIds.Length > 0)
{
// Keep folder-like items (BoxSets, Playlists) whose linked children descend from any of the requested ancestor ids.
var linkedChildAncestorIds = filter.LinkedChildAncestorIds;
baseQuery = baseQuery.Where(e => context.LinkedChildren.Any(lc =>
lc.ParentId == e.Id
&& lc.Child!.Parents!.Any(a => linkedChildAncestorIds.Contains(a.ParentItemId))));
}
if (!string.IsNullOrWhiteSpace(filter.AncestorWithPresentationUniqueKey))
{
baseQuery = baseQuery