mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-08 08:48:48 +01:00
46 lines
1.7 KiB
C#
46 lines
1.7 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 the people names per item for a batch of item IDs, preserving per-item list order.
|
|
/// One database round-trip for the whole batch; grouped by item id in memory.
|
|
/// Items with no people are omitted from the returned dictionary.
|
|
/// </summary>
|
|
/// <param name="itemIds">The item IDs to get people for.</param>
|
|
/// <param name="personTypes">Optional person types to include (e.g. "Actor", "Director"). Empty for all.</param>
|
|
/// <returns>Dictionary keyed by item id; values are the per-item people names.</returns>
|
|
IReadOnlyDictionary<Guid, IReadOnlyList<string>> GetPeopleNamesByItem(IReadOnlyList<Guid> itemIds, IReadOnlyList<string> personTypes);
|
|
}
|