From 59cd5f983bc30a468481543e2cc52575cfe3d818 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Mon, 7 Sep 2026 10:30:01 +0200 Subject: Expose optimized ItemCounts for byName items --- Emby.Server.Implementations/Library/LibraryManager.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Emby.Server.Implementations') diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index e6fa94fbef..0044fcd4dc 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -1801,6 +1801,18 @@ namespace Emby.Server.Implementations.Library return _countService.GetItemCountsForNameItem(kind, id, relatedItemKinds, query); } + /// + public Dictionary GetItemCountsForNameItems(BaseItemKind kind, IReadOnlyList ids, BaseItemKind[] relatedItemKinds, User? user) + { + var query = new InternalItemsQuery(user); + if (user is not null) + { + AddUserToQuery(query, user); + } + + return _countService.GetItemCountsForNameItems(kind, ids, relatedItemKinds, query); + } + public Dictionary GetChildCountBatch(IReadOnlyList parentIds, User? user) { return _countService.GetChildCountBatch(parentIds, user); -- cgit v1.2.3