From 3a090a571682033f54cc2824d4003ff873467b4c Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Wed, 18 Feb 2026 20:28:42 +0100 Subject: Optimize item count calculation for named items --- MediaBrowser.Controller/Library/ILibraryManager.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'MediaBrowser.Controller/Library/ILibraryManager.cs') diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index e73dede1d4..5cfb940891 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -706,6 +706,16 @@ namespace MediaBrowser.Controller.Library ItemCounts GetItemCounts(InternalItemsQuery query); + /// + /// Gets item counts for a "by-name" item using an optimized query path. + /// + /// The kind of the name item. + /// The ID of the name item. + /// The item kinds to count. + /// The user for access filtering. + /// The item counts grouped by type. + ItemCounts GetItemCountsForNameItem(BaseItemKind kind, Guid id, BaseItemKind[] relatedItemKinds, User? user); + /// /// Batch-fetches child counts for multiple parent folders. /// Returns the count of immediate children (non-recursive) for each parent. -- cgit v1.2.3