aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/InternalPeopleQuery.cs
blob: 8d2a959f4d602dbe2718ada124b8c0c1c39f1c30 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#nullable disable

#pragma warning disable CS1591

using System;
using System.Collections.Generic;
using Jellyfin.Database.Implementations.Entities;

namespace MediaBrowser.Controller.Entities
{
    public class InternalPeopleQuery
    {
        public InternalPeopleQuery()
         : this(Array.Empty<string>(), Array.Empty<string>())
        {
        }

        public InternalPeopleQuery(IReadOnlyList<string> personTypes, IReadOnlyList<string> excludePersonTypes)
        {
            PersonTypes = personTypes;
            ExcludePersonTypes = excludePersonTypes;
            EnableTotalRecordCount = true;
        }

        /// <summary>
        /// Gets or sets a value indicating whether to count the matching people. Under an
        /// <see cref="AccessFilter"/> the count is the expensive half of the query: the page walk stops
        /// at the limit, the count has to check every person.
        /// </summary>
        public bool EnableTotalRecordCount { get; set; }

        public int? StartIndex { get; set; }

        /// <summary>
        /// Gets or sets the maximum number of items the query should return.
        /// </summary>
        public int Limit { get; set; }

        public Guid ItemId { get; set; }

        public Guid? ParentId { get; set; }

        public IReadOnlyList<string> PersonTypes { get; }

        public IReadOnlyList<string> ExcludePersonTypes { get; }

        public int? MaxListOrder { get; set; }

        public Guid AppearsInItemId { get; set; }

        public string NameContains { get; set; }

        public string NameStartsWith { get; set; }

        public string NameLessThan { get; set; }

        public string NameStartsWithOrGreater { get; set; }

        public User User { get; set; }

        public bool? IsFavorite { get; set; }

        /// <summary>
        /// Gets or sets the item query whose access settings (library access, parental rating, tags)
        /// people must satisfy through at least one of the items they are credited on.
        /// </summary>
        public InternalItemsQuery AccessFilter { get; set; }
    }
}