diff options
| author | Cody Robibero <cody@robibe.ro> | 2021-05-11 05:55:46 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-11 13:55:46 +0200 |
| commit | e3f55a0c54a2517361c237543aba717fd2a16e69 (patch) | |
| tree | 699391d1880b265db662388c7b5c4823b53623ea /MediaBrowser.Controller/Entities/InternalPeopleQuery.cs | |
| parent | a84e8c3884291acb721aeb202139372462e6c800 (diff) | |
Reduce warnings in MediaBrowser.Controller (#6006)
Co-authored-by: Patrick Barron <18354464+barronpm@users.noreply.github.com>
Diffstat (limited to 'MediaBrowser.Controller/Entities/InternalPeopleQuery.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/InternalPeopleQuery.cs | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/MediaBrowser.Controller/Entities/InternalPeopleQuery.cs b/MediaBrowser.Controller/Entities/InternalPeopleQuery.cs index b2d6a4609..3e1d89274 100644 --- a/MediaBrowser.Controller/Entities/InternalPeopleQuery.cs +++ b/MediaBrowser.Controller/Entities/InternalPeopleQuery.cs @@ -3,12 +3,24 @@ #pragma warning disable CS1591 using System; +using System.Collections.Generic; using Jellyfin.Data.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; + } + /// <summary> /// Gets or sets the maximum number of items the query should return. /// </summary> @@ -16,9 +28,9 @@ namespace MediaBrowser.Controller.Entities public Guid ItemId { get; set; } - public string[] PersonTypes { get; set; } + public IReadOnlyList<string> PersonTypes { get; } - public string[] ExcludePersonTypes { get; set; } + public IReadOnlyList<string> ExcludePersonTypes { get; } public int? MaxListOrder { get; set; } @@ -29,11 +41,5 @@ namespace MediaBrowser.Controller.Entities public User User { get; set; } public bool? IsFavorite { get; set; } - - public InternalPeopleQuery() - { - PersonTypes = Array.Empty<string>(); - ExcludePersonTypes = Array.Empty<string>(); - } } } |
