diff options
| author | Cody Robibero <cody@robibe.ro> | 2025-08-12 20:20:54 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-12 20:20:54 -0600 |
| commit | bd94ca30711e551c834d10c5c3de6fb6a7795bc7 (patch) | |
| tree | 52040cf9cb2b083cf923dd093b94d7c97908a327 /Emby.Server.Implementations/Library | |
| parent | 869b4f8bbf3d27c95e3a012b1f9d7d1cb590fcfc (diff) | |
| parent | beca405ad4c771f9cfdd5b410b4a4ba9f1c2d6c8 (diff) | |
Merge pull request #14634 from crobibero/itemname-counts
Diffstat (limited to 'Emby.Server.Implementations/Library')
| -rw-r--r-- | Emby.Server.Implementations/Library/LibraryManager.cs | 19 |
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); |
