diff options
Diffstat (limited to 'MediaBrowser.Controller/Persistence/IPeopleRepository.cs')
| -rw-r--r-- | MediaBrowser.Controller/Persistence/IPeopleRepository.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Persistence/IPeopleRepository.cs b/MediaBrowser.Controller/Persistence/IPeopleRepository.cs index 418289cb4c..e2833dc722 100644 --- a/MediaBrowser.Controller/Persistence/IPeopleRepository.cs +++ b/MediaBrowser.Controller/Persistence/IPeopleRepository.cs @@ -1,13 +1,15 @@ #nullable disable -#pragma warning disable CS1591 - using System; using System.Collections.Generic; using MediaBrowser.Controller.Entities; +using MediaBrowser.Model.Querying; namespace MediaBrowser.Controller.Persistence; +/// <summary> +/// Provides methods for accessing Peoples. +/// </summary> public interface IPeopleRepository { /// <summary> @@ -15,7 +17,7 @@ public interface IPeopleRepository /// </summary> /// <param name="filter">The query.</param> /// <returns>The list of people matching the filter.</returns> - IReadOnlyList<PersonInfo> GetPeople(InternalPeopleQuery filter); + QueryResult<PersonInfo> GetPeople(InternalPeopleQuery filter); /// <summary> /// Updates the people. @@ -30,4 +32,12 @@ public interface IPeopleRepository /// <param name="filter">The query.</param> /// <returns>The list of people names matching the filter.</returns> IReadOnlyList<string> GetPeopleNames(InternalPeopleQuery filter); + + /// <summary> + /// Gets the distinct people names per item for multiple items efficiently by querying from the mapping table. + /// </summary> + /// <param name="itemIds">The item IDs to get people for.</param> + /// <param name="personTypes">The person types to include (e.g. "Actor", "Director").</param> + /// <returns>A dictionary mapping each item ID to its distinct people names, ordered by cast list order. Items with no matching people are omitted.</returns> + IReadOnlyDictionary<Guid, IReadOnlyList<string>> GetPeopleNamesByItems(IReadOnlyList<Guid> itemIds, IReadOnlyList<string> personTypes); } |
