Ver Fonte

Merge pull request #14094 from allesmi/fix/ancestor-ids-parent-child-relation

Translate query by AncestorIds correctly
Alexander Miller há 2 semanas atrás
pai
commit
29fc7711a1

+ 1 - 0
CONTRIBUTORS.md

@@ -195,6 +195,7 @@
  - [Kenneth Cochran](https://github.com/kennethcochran)
  - [benedikt257](https://github.com/benedikt257)
  - [revam](https://github.com/revam)
+ - [allesmi](https://github.com/allesmi)
 
 # Emby Contributors
 

+ 1 - 1
Jellyfin.Server.Implementations/Item/BaseItemRepository.cs

@@ -2191,7 +2191,7 @@ public sealed class BaseItemRepository
 
         if (filter.AncestorIds.Length > 0)
         {
-            baseQuery = baseQuery.Where(e => e.Children!.Any(f => filter.AncestorIds.Contains(f.ItemId)));
+            baseQuery = baseQuery.Where(e => e.Parents!.Any(f => filter.AncestorIds.Contains(f.ParentItemId)));
         }
 
         if (!string.IsNullOrWhiteSpace(filter.AncestorWithPresentationUniqueKey))