From 9dfcc0918f797a0937b688426232e17898648f94 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Wed, 20 May 2026 11:34:45 +0200 Subject: Add support for filtering boxsets by parentId --- Jellyfin.Api/Controllers/ItemsController.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Jellyfin.Api/Controllers/ItemsController.cs') diff --git a/Jellyfin.Api/Controllers/ItemsController.cs b/Jellyfin.Api/Controllers/ItemsController.cs index 43e4737694..f3f0bd2482 100644 --- a/Jellyfin.Api/Controllers/ItemsController.cs +++ b/Jellyfin.Api/Controllers/ItemsController.cs @@ -280,10 +280,17 @@ public class ItemsController : BaseJellyfinApiController var item = _libraryManager.GetParentItem(parentId, userId); QueryResult result; + Guid[] boxSetLinkedChildAncestorIds = []; if (includeItemTypes.Length == 1 && includeItemTypes[0] == BaseItemKind.BoxSet && item is not BoxSet) { + var isBoxSetsLibrary = item is IHasCollectionType hct && hct.CollectionType == CollectionType.boxsets; + if (parentId.HasValue && item is not UserRootFolder && !isBoxSetsLibrary) + { + boxSetLinkedChildAncestorIds = [parentId.Value]; + } + parentId = null; item = _libraryManager.GetUserRootFolder(); } @@ -405,6 +412,7 @@ public class ItemsController : BaseJellyfinApiController MaxPremiereDate = maxPremiereDate?.ToUniversalTime(), AudioLanguages = audioLanguages, SubtitleLanguages = subtitleLanguages, + LinkedChildAncestorIds = boxSetLinkedChildAncestorIds, }; if (ids.Length != 0 || !string.IsNullOrWhiteSpace(searchTerm)) -- cgit v1.2.3