aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Miller <alles.mil@gmail.com>2025-05-15 11:48:20 +0200
committerGitHub <noreply@github.com>2025-05-15 11:48:20 +0200
commit29fc7711a19f941211cfca9fea586175d5611dd3 (patch)
tree4e4ed72134b32f4297342d5839e91066c551cf78
parent265cc5014437b5e6ced200352b79ba6e84e8fc31 (diff)
Merge pull request #14094 from allesmi/fix/ancestor-ids-parent-child-relation
Translate query by AncestorIds correctly
-rw-r--r--CONTRIBUTORS.md1
-rw-r--r--Jellyfin.Server.Implementations/Item/BaseItemRepository.cs2
2 files changed, 2 insertions, 1 deletions
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 938eee0d7..1ff5607ea 100644
--- a/CONTRIBUTORS.md
+++ b/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
diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs
index 7d30ac1a0..64c4a9226 100644
--- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs
+++ b/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))