Files
jellyfin/MediaBrowser.Controller/Persistence/IPeopleRepository.cs
2026-05-15 14:37:01 +02:00

45 lines
1.6 KiB
C#

#nullable disable
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>
/// Gets the people.
/// </summary>
/// <param name="filter">The query.</param>
/// <returns>The list of people matching the filter.</returns>
QueryResult<PersonInfo> GetPeople(InternalPeopleQuery filter);
/// <summary>
/// Updates the people.
/// </summary>
/// <param name="itemId">The item identifier.</param>
/// <param name="people">The people.</param>
void UpdatePeople(Guid itemId, IReadOnlyList<PersonInfo> people);
/// <summary>
/// Gets the people names.
/// </summary>
/// <param name="filter">The query.</param>
/// <returns>The list of people names matching the filter.</returns>
IReadOnlyList<string> GetPeopleNames(InternalPeopleQuery filter);
/// <summary>
/// Gets distinct people names 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>
/// <param name="limit">Maximum number of names to return.</param>
/// <returns>The distinct people names.</returns>
IReadOnlyList<string> GetPeopleNamesByItems(IReadOnlyList<Guid> itemIds, IReadOnlyList<string> personTypes, int limit);
}