aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Persistence/IPeopleRepository.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Persistence/IPeopleRepository.cs')
-rw-r--r--MediaBrowser.Controller/Persistence/IPeopleRepository.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Persistence/IPeopleRepository.cs b/MediaBrowser.Controller/Persistence/IPeopleRepository.cs
index a89f3ef9ee..15183a8806 100644
--- a/MediaBrowser.Controller/Persistence/IPeopleRepository.cs
+++ b/MediaBrowser.Controller/Persistence/IPeopleRepository.cs
@@ -32,4 +32,25 @@ 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>
+ /// Deletes every credit that no item maps to any more.
+ /// </summary>
+ /// <returns>The number of credits that were deleted.</returns>
+ int DeleteOrphanedCredits();
+
+ /// <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);
+
+ /// <summary>
+ /// Gets the people for multiple items in a single query, keyed by item id.
+ /// </summary>
+ /// <param name="itemIds">The item IDs to get people for.</param>
+ /// <returns>A dictionary mapping each item ID to its people (with role, type and sort order), ordered by cast list order. Items with no people are omitted.</returns>
+ IReadOnlyDictionary<Guid, IReadOnlyList<PersonInfo>> GetPeopleByItems(IReadOnlyList<Guid> itemIds);
}