aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/LibraryManager.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-02-18 20:28:42 +0100
committerShadowghost <Ghost_of_Stone@web.de>2026-02-18 20:28:42 +0100
commit3a090a571682033f54cc2824d4003ff873467b4c (patch)
treed43a03e53060f71d2df48b7b9a80c01e2093b9a2 /Emby.Server.Implementations/Library/LibraryManager.cs
parentf96c399e62575a78195b4eb6eace3ccd2393bdb3 (diff)
Optimize item count calculation for named items
Diffstat (limited to 'Emby.Server.Implementations/Library/LibraryManager.cs')
-rw-r--r--Emby.Server.Implementations/Library/LibraryManager.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs
index 9a5bd41914..60ac15ca97 100644
--- a/Emby.Server.Implementations/Library/LibraryManager.cs
+++ b/Emby.Server.Implementations/Library/LibraryManager.cs
@@ -1561,6 +1561,18 @@ namespace Emby.Server.Implementations.Library
return _itemRepository.GetItemCounts(query);
}
+ /// <inheritdoc/>
+ public ItemCounts GetItemCountsForNameItem(BaseItemKind kind, Guid id, BaseItemKind[] relatedItemKinds, User? user)
+ {
+ var query = new InternalItemsQuery(user);
+ if (user is not null)
+ {
+ AddUserToQuery(query, user);
+ }
+
+ return _itemRepository.GetItemCountsForNameItem(kind, id, relatedItemKinds, query);
+ }
+
public Dictionary<Guid, int> GetChildCountBatch(IReadOnlyList<Guid> parentIds, Guid? userId)
{
return _itemRepository.GetChildCountBatch(parentIds, userId);