diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2026-02-05 19:57:03 +0100 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2026-02-05 19:57:39 +0100 |
| commit | 0c46004cd921aed337c5b995afe253d65c15eeb4 (patch) | |
| tree | cf5cff3283ee5ca7cd59eec91e9e4ce0b06a3066 /MediaBrowser.Controller/Entities/Folder.cs | |
| parent | a0346fe5b70a434860f973086be176ecc2018a52 (diff) | |
Optimize accessibility checks
Diffstat (limited to 'MediaBrowser.Controller/Entities/Folder.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/Folder.cs | 5 |
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; |
