diff options
| author | Cody Robibero <cody@robibe.ro> | 2026-08-31 17:47:33 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-31 17:47:33 -0400 |
| commit | 0cec5661e012130921d87293a934487a770d629a (patch) | |
| tree | a05420e8251a0e29782ae13e59fca4602c3adc37 /Emby.Server.Implementations/Library | |
| parent | fe73b1a94903a39bd89e0b0b542ede35d24266a8 (diff) | |
| parent | 7ccce8e0e7a9446db0789c6c6799501b5609718e (diff) | |
Merge pull request #17752 from Shadowghost/fix-linkedchildren-recursive
Fix recursive handling for LinkedChildren
Diffstat (limited to 'Emby.Server.Implementations/Library')
| -rw-r--r-- | Emby.Server.Implementations/Library/LibraryManager.cs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index c045f8558c..3db8265f6e 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -1984,18 +1984,10 @@ namespace Emby.Server.Implementations.Library { // Playlists and BoxSets store their contents in LinkedChildren and never // populate AncestorIds for those items, so a recursive AncestorIds query - // would return zero rows. Resolve to the linked child IDs up front and - // route through the existing indexed ItemIds filter. - query.ItemIds = folder.LinkedChildren - .Where(lc => lc.ItemId.HasValue && !lc.ItemId.Value.IsEmpty()) - .Select(lc => lc.ItemId!.Value) - .ToArray(); - - // Empty linked-children should still return empty rather than scanning everything. - if (query.ItemIds.Length == 0) - { - query.ItemIds = [Guid.NewGuid()]; - } + // would return zero rows. Filter by the descendant set instead, which follows + // the links and keeps descending, so a linked folder contributes what is below + // it as well - the episodes of a Series added to a collection, for example. + query.DescendantOfId = folder.Id; } else { |
