blob: e2833dc722c07cffe906b75e11fe2cfdf7350aa9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#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 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);
}
|