jellyfin/MediaBrowser.Model/Querying/ItemQuery.cs

333 lines
11 KiB
C#
Raw Normal View History

using MediaBrowser.Model.Entities;
2013-02-21 01:33:05 +00:00
using System;
2013-03-10 05:36:39 +00:00
namespace MediaBrowser.Model.Querying
2013-02-21 01:33:05 +00:00
{
/// <summary>
/// Contains all the possible parameters that can be used to query for items
/// </summary>
public class ItemQuery
{
/// <summary>
/// The user to localize search results for
/// </summary>
/// <value>The user id.</value>
public string UserId { get; set; }
2013-02-21 01:33:05 +00:00
/// <summary>
/// Specify this to localize the search to a specific item or folder. Omit to use the root.
/// </summary>
/// <value>The parent id.</value>
public string ParentId { get; set; }
/// <summary>
/// Skips over a given number of items within the results. Use for paging.
/// </summary>
/// <value>The start index.</value>
public int? StartIndex { get; set; }
/// <summary>
/// The maximum number of items to return
/// </summary>
/// <value>The limit.</value>
public int? Limit { get; set; }
/// <summary>
/// What to sort the results by
/// </summary>
/// <value>The sort by.</value>
2013-03-10 04:22:36 +00:00
public string[] SortBy { get; set; }
2013-02-21 01:33:05 +00:00
2013-04-24 14:30:12 +00:00
/// <summary>
2015-03-13 17:25:28 +00:00
/// Gets or sets the artist ids.
2013-04-24 14:30:12 +00:00
/// </summary>
2015-03-13 17:25:28 +00:00
/// <value>The artist ids.</value>
public string[] ArtistIds { get; set; }
2013-02-21 01:33:05 +00:00
/// <summary>
/// The sort order to return results with
/// </summary>
/// <value>The sort order.</value>
public SortOrder? SortOrder { get; set; }
/// <summary>
/// Filters to apply to the results
/// </summary>
/// <value>The filters.</value>
public ItemFilter[] Filters { get; set; }
/// <summary>
/// Fields to return within the items, in addition to basic information
/// </summary>
/// <value>The fields.</value>
public ItemFields[] Fields { get; set; }
2013-04-04 15:22:39 +00:00
/// <summary>
/// Gets or sets the media types.
/// </summary>
/// <value>The media types.</value>
public string[] MediaTypes { get; set; }
/// <summary>
/// Gets or sets the video formats.
/// </summary>
/// <value>The video formats.</value>
2013-06-25 18:10:39 +00:00
public bool? Is3D { get; set; }
2013-04-04 15:22:39 +00:00
/// <summary>
/// Gets or sets the video types.
/// </summary>
/// <value>The video types.</value>
public VideoType[] VideoTypes { get; set; }
2013-04-21 01:17:59 +00:00
2013-02-21 01:33:05 +00:00
/// <summary>
/// Whether or not to perform the query recursively
/// </summary>
/// <value><c>true</c> if recursive; otherwise, <c>false</c>.</value>
public bool Recursive { get; set; }
/// <summary>
/// Limit results to items containing specific genres
/// </summary>
/// <value>The genres.</value>
public string[] Genres { get; set; }
/// <summary>
2015-03-13 18:45:03 +00:00
/// Gets or sets the studio ids.
2013-02-21 01:33:05 +00:00
/// </summary>
2015-03-13 18:45:03 +00:00
/// <value>The studio ids.</value>
public string[] StudioIds { get; set; }
2013-02-21 01:33:05 +00:00
/// <summary>
/// Gets or sets the exclude item types.
/// </summary>
/// <value>The exclude item types.</value>
public string[] ExcludeItemTypes { get; set; }
/// <summary>
/// Gets or sets the include item types.
/// </summary>
/// <value>The include item types.</value>
public string[] IncludeItemTypes { get; set; }
2013-04-21 01:17:59 +00:00
2013-02-21 01:33:05 +00:00
/// <summary>
/// Limit results to items containing specific years
/// </summary>
/// <value>The years.</value>
public int[] Years { get; set; }
/// <summary>
/// Limit results to items containing a specific person
/// </summary>
/// <value>The person.</value>
2015-03-18 16:40:16 +00:00
public string[] PersonIds { get; set; }
2013-02-21 01:33:05 +00:00
/// <summary>
/// If the Person filter is used, this can also be used to restrict to a specific person type
/// </summary>
/// <value>The type of the person.</value>
2013-04-13 23:43:41 +00:00
public string[] PersonTypes { get; set; }
2013-02-21 01:33:05 +00:00
/// <summary>
/// Search characters used to find items
/// </summary>
/// <value>The index by.</value>
public string SearchTerm { get; set; }
2013-04-21 01:17:59 +00:00
2013-02-21 01:33:05 +00:00
/// <summary>
/// Gets or sets the image types.
/// </summary>
/// <value>The image types.</value>
public ImageType[] ImageTypes { get; set; }
2013-03-16 05:52:33 +00:00
/// <summary>
/// Gets or sets the air days.
/// </summary>
/// <value>The air days.</value>
public DayOfWeek[] AirDays { get; set; }
/// <summary>
/// Gets or sets the series status.
/// </summary>
/// <value>The series status.</value>
public SeriesStatus[] SeriesStatuses { get; set; }
2013-04-21 01:17:59 +00:00
2013-03-16 05:52:33 +00:00
/// <summary>
/// Gets or sets the ids, which are specific items to retrieve
/// </summary>
/// <value>The ids.</value>
public string[] Ids { get; set; }
2013-04-14 00:17:25 +00:00
/// <summary>
/// Gets or sets the min official rating.
/// </summary>
/// <value>The min official rating.</value>
public string MinOfficialRating { get; set; }
/// <summary>
/// Gets or sets the max official rating.
/// </summary>
/// <value>The max official rating.</value>
public string MaxOfficialRating { get; set; }
2013-04-21 01:17:59 +00:00
2013-09-13 20:45:27 +00:00
/// <summary>
/// Gets or sets the min index number.
/// </summary>
/// <value>The min index number.</value>
public int? MinIndexNumber { get; set; }
2013-09-11 17:54:59 +00:00
2013-09-13 20:45:27 +00:00
/// <summary>
/// Gets or sets a value indicating whether this instance has parental rating.
/// </summary>
/// <value><c>null</c> if [has parental rating] contains no value, <c>true</c> if [has parental rating]; otherwise, <c>false</c>.</value>
2013-09-11 17:54:59 +00:00
public bool? HasParentalRating { get; set; }
2013-09-13 20:45:27 +00:00
/// <summary>
/// Gets or sets a value indicating whether this instance is HD.
/// </summary>
/// <value><c>null</c> if [is HD] contains no value, <c>true</c> if [is HD]; otherwise, <c>false</c>.</value>
2013-09-11 17:54:59 +00:00
public bool? IsHD { get; set; }
2013-09-13 20:45:27 +00:00
/// <summary>
/// Gets or sets the parent index number.
/// </summary>
/// <value>The parent index number.</value>
public int? ParentIndexNumber { get; set; }
2013-10-03 01:22:50 +00:00
/// <summary>
/// Gets or sets the min players.
/// </summary>
/// <value>The min players.</value>
public int? MinPlayers { get; set; }
2013-10-06 03:03:08 +00:00
/// <summary>
/// Gets or sets the max players.
/// </summary>
/// <value>The max players.</value>
public int? MaxPlayers { get; set; }
2014-12-03 03:13:03 +00:00
2013-10-03 01:22:50 +00:00
/// <summary>
/// Gets or sets the name starts with or greater.
/// </summary>
/// <value>The name starts with or greater.</value>
public string NameStartsWithOrGreater { get; set; }
2014-03-06 02:59:48 +00:00
/// <summary>
2014-03-05 21:46:32 +00:00
/// Gets or sets the name starts with.
/// </summary>
/// <value>The name starts with or greater.</value>
public string NameStartsWith { get; set; }
2014-12-03 03:13:03 +00:00
2014-03-06 02:59:48 +00:00
/// <summary>
2014-03-05 21:46:32 +00:00
/// Gets or sets the name starts with.
/// </summary>
/// <value>The name lessthan.</value>
public string NameLessThan { get; set; }
2013-10-03 01:22:50 +00:00
/// <summary>
/// Gets or sets the album artist starts with or greater.
/// </summary>
/// <value>The album artist starts with or greater.</value>
public string AlbumArtistStartsWithOrGreater { get; set; }
2013-10-15 22:16:39 +00:00
/// <summary>
/// Gets or sets a value indicating whether [include index containers].
/// </summary>
/// <value><c>true</c> if [include index containers]; otherwise, <c>false</c>.</value>
public bool IncludeIndexContainers { get; set; }
/// <summary>
/// Gets or sets the location types.
/// </summary>
/// <value>The location types.</value>
public LocationType[] LocationTypes { get; set; }
2013-10-26 22:01:21 +00:00
/// <summary>
/// Gets or sets a value indicating whether this instance is missing episode.
/// </summary>
/// <value><c>null</c> if [is missing episode] contains no value, <c>true</c> if [is missing episode]; otherwise, <c>false</c>.</value>
public bool? IsMissing { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is unaired episode.
/// </summary>
/// <value><c>null</c> if [is unaired episode] contains no value, <c>true</c> if [is unaired episode]; otherwise, <c>false</c>.</value>
public bool? IsUnaired { get; set; }
2013-10-26 22:40:53 +00:00
public bool? IsVirtualUnaired { get; set; }
2014-01-19 19:25:29 +00:00
public bool? IsInBoxSet { get; set; }
2014-03-18 14:54:47 +00:00
public bool? CollapseBoxSetItems { get; set; }
2014-01-19 19:25:29 +00:00
public bool? IsPlayed { get; set; }
2014-12-03 03:13:03 +00:00
/// <summary>
/// Gets or sets the exclude location types.
/// </summary>
/// <value>The exclude location types.</value>
public LocationType[] ExcludeLocationTypes { get; set; }
2013-11-03 16:19:33 +00:00
public double? MinCommunityRating { get; set; }
public double? MinCriticRating { get; set; }
2013-11-15 21:31:33 +00:00
public int? AiredDuringSeason { get; set; }
public DateTime? MinPremiereDate { get; set; }
public DateTime? MaxPremiereDate { get; set; }
2014-12-01 12:43:34 +00:00
public bool? EnableImages { get; set; }
public int? ImageTypeLimit { get; set; }
2014-12-03 03:13:03 +00:00
public ImageType[] EnableImageTypes { get; set; }
2015-04-03 15:52:49 +00:00
[Obsolete]
public string[] Artists { get; set; }
[Obsolete]
public string[] Studios { get; set; }
[Obsolete]
public string Person { get; set; }
2016-05-17 19:18:50 +00:00
public bool EnableTotalRecordCount { get; set; }
2013-04-21 01:17:59 +00:00
/// <summary>
2013-09-13 20:45:27 +00:00
/// Initializes a new instance of the <see cref="ItemQuery" /> class.
2013-04-21 01:17:59 +00:00
/// </summary>
public ItemQuery()
{
LocationTypes = new LocationType[] { };
ExcludeLocationTypes = new LocationType[] { };
2014-12-03 03:13:03 +00:00
SortBy = new string[] { };
2013-04-21 01:17:59 +00:00
2014-12-03 03:13:03 +00:00
Filters = new ItemFilter[] { };
2013-04-21 01:17:59 +00:00
2014-12-03 03:13:03 +00:00
Fields = new ItemFields[] { };
2013-04-21 01:17:59 +00:00
2014-12-03 03:13:03 +00:00
MediaTypes = new string[] { };
2013-04-21 01:17:59 +00:00
2014-12-03 03:13:03 +00:00
VideoTypes = new VideoType[] { };
2013-04-21 01:17:59 +00:00
2016-05-17 19:18:50 +00:00
EnableTotalRecordCount = true;
2015-04-03 15:52:49 +00:00
Artists = new string[] { };
Studios = new string[] { };
2013-04-21 01:17:59 +00:00
Genres = new string[] { };
2015-03-13 18:45:03 +00:00
StudioIds = new string[] { };
2013-04-21 01:17:59 +00:00
IncludeItemTypes = new string[] { };
ExcludeItemTypes = new string[] { };
Years = new int[] { };
PersonTypes = new string[] { };
Ids = new string[] { };
2015-03-13 17:25:28 +00:00
ArtistIds = new string[] { };
2015-03-18 16:40:16 +00:00
PersonIds = new string[] { };
2013-04-21 01:17:59 +00:00
ImageTypes = new ImageType[] { };
AirDays = new DayOfWeek[] { };
SeriesStatuses = new SeriesStatus[] { };
2014-12-03 03:13:03 +00:00
EnableImageTypes = new ImageType[] { };
2013-04-21 01:17:59 +00:00
}
2013-02-21 01:33:05 +00:00
}
}