aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/Folder.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-02-05 19:57:03 +0100
committerShadowghost <Ghost_of_Stone@web.de>2026-02-05 19:57:39 +0100
commit0c46004cd921aed337c5b995afe253d65c15eeb4 (patch)
treecf5cff3283ee5ca7cd59eec91e9e4ce0b06a3066 /MediaBrowser.Controller/Entities/Folder.cs
parenta0346fe5b70a434860f973086be176ecc2018a52 (diff)
Optimize accessibility checks
Diffstat (limited to 'MediaBrowser.Controller/Entities/Folder.cs')
-rw-r--r--MediaBrowser.Controller/Entities/Folder.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs
index b88572a67f..e1f7d095c3 100644
--- a/MediaBrowser.Controller/Entities/Folder.cs
+++ b/MediaBrowser.Controller/Entities/Folder.cs
@@ -1699,8 +1699,11 @@ namespace MediaBrowser.Controller.Entities
if (SupportsPlayedStatus || (itemDto is not null && fields.ContainsField(ItemFields.RecursiveItemCount)))
{
+ // Create a minimal query with just the user - skip ConfigureUserAccess to avoid
+ // expensive GetUserViews calls. Since we're counting descendants of a specific
+ // item (this folder) that the user already has access to, TopParentIds filtering
+ // is redundant. The parental rating filter is applied via query.User.
var query = new InternalItemsQuery(user);
- LibraryManager.ConfigureUserAccess(query, user);
int playedCount;
int totalCount;