aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-04-12 18:46:15 +0200
committerShadowghost <Ghost_of_Stone@web.de>2026-04-12 18:46:35 +0200
commit5b4882c10224a664359e3ce97e44e403523e8546 (patch)
treef92814c7a25a78b7a4c008467d24f813271fa633
parentd8bbb4dfe8e614dd8754d83c622a4964af1d21f6 (diff)
More generic collection folder filter handling
-rw-r--r--Jellyfin.Api/Controllers/ItemsController.cs17
1 files changed, 10 insertions, 7 deletions
diff --git a/Jellyfin.Api/Controllers/ItemsController.cs b/Jellyfin.Api/Controllers/ItemsController.cs
index 97183f09d4..da52e7b23e 100644
--- a/Jellyfin.Api/Controllers/ItemsController.cs
+++ b/Jellyfin.Api/Controllers/ItemsController.cs
@@ -299,17 +299,20 @@ public class ItemsController : BaseJellyfinApiController
recursive = true;
includeItemTypes = new[] { BaseItemKind.Playlist };
}
- else if (folder is ICollectionFolder && includeItemTypes.Length == 0)
+ else if (folder is ICollectionFolder)
{
// When the client doesn't specify recursive/includeItemTypes, force the query
// through the database path where all filters (IsHD, genres, etc.) are applied.
- recursive = true;
- includeItemTypes = collectionType switch
+ recursive ??= true;
+ if (includeItemTypes.Length == 0)
{
- CollectionType.boxsets => [BaseItemKind.BoxSet],
- null => [BaseItemKind.Movie, BaseItemKind.Series], // mixed
- _ => []
- };
+ includeItemTypes = collectionType switch
+ {
+ CollectionType.boxsets => [BaseItemKind.BoxSet],
+ null => [BaseItemKind.Movie, BaseItemKind.Series],
+ _ => []
+ };
+ }
}
if (item is not UserRootFolder