aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Persistence/IItemRepository.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Persistence/IItemRepository.cs')
-rw-r--r--MediaBrowser.Controller/Persistence/IItemRepository.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Persistence/IItemRepository.cs b/MediaBrowser.Controller/Persistence/IItemRepository.cs
index f1b27c52db..bcbbcc4785 100644
--- a/MediaBrowser.Controller/Persistence/IItemRepository.cs
+++ b/MediaBrowser.Controller/Persistence/IItemRepository.cs
@@ -112,6 +112,17 @@ public interface IItemRepository
ItemCounts GetItemCounts(InternalItemsQuery filter);
+ /// <summary>
+ /// Gets item counts for a "by-name" item (Person, MusicArtist, Genre, MusicGenre, Studio, Year)
+ /// using an optimized query that starts from the mapping table instead of scanning all BaseItems.
+ /// </summary>
+ /// <param name="kind">The kind of the name item.</param>
+ /// <param name="id">The ID of the name item.</param>
+ /// <param name="relatedItemKinds">The item kinds to count.</param>
+ /// <param name="accessFilter">A pre-configured query with user access filtering settings.</param>
+ /// <returns>The item counts grouped by type.</returns>
+ ItemCounts GetItemCountsForNameItem(BaseItemKind kind, Guid id, BaseItemKind[] relatedItemKinds, InternalItemsQuery accessFilter);
+
QueryResult<(BaseItem Item, ItemCounts ItemCounts)> GetGenres(InternalItemsQuery filter);
QueryResult<(BaseItem Item, ItemCounts ItemCounts)> GetMusicGenres(InternalItemsQuery filter);