diff options
| author | Bond-009 <bond.009@outlook.com> | 2026-05-21 19:32:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-21 19:32:39 +0200 |
| commit | 4209b3ba519d96cec4c7a5e0987de2b1237e52ae (patch) | |
| tree | 7d7f54d88f7ca1d71efaeecc17c0e5826bc6efef /Jellyfin.Api/Controllers/ItemsController.cs | |
| parent | 40485aa2f67c903baab2cdde939f4ee13c40b569 (diff) | |
| parent | 9dfcc0918f797a0937b688426232e17898648f94 (diff) | |
Add support for filtering boxsets by parentId (#16882)
Diffstat (limited to 'Jellyfin.Api/Controllers/ItemsController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/ItemsController.cs | 8 |
1 files changed, 8 insertions, 0 deletions
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<BaseItem> 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)) |
