aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/LibraryManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Library/LibraryManager.cs')
-rw-r--r--Emby.Server.Implementations/Library/LibraryManager.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs
index 526092c62..58a971f62 100644
--- a/Emby.Server.Implementations/Library/LibraryManager.cs
+++ b/Emby.Server.Implementations/Library/LibraryManager.cs
@@ -1389,6 +1389,25 @@ namespace Emby.Server.Implementations.Library
return _itemRepository.GetCount(query);
}
+ public ItemCounts GetItemCounts(InternalItemsQuery query)
+ {
+ if (query.Recursive && !query.ParentId.IsEmpty())
+ {
+ var parent = GetItemById(query.ParentId);
+ if (parent is not null)
+ {
+ SetTopParentIdsOrAncestors(query, [parent]);
+ }
+ }
+
+ if (query.User is not null)
+ {
+ AddUserToQuery(query, query.User);
+ }
+
+ return _itemRepository.GetItemCounts(query);
+ }
+
public IReadOnlyList<BaseItem> GetItemList(InternalItemsQuery query, List<BaseItem> parents)
{
SetTopParentIdsOrAncestors(query, parents);