jellyfin/MediaBrowser.Model/Querying/ItemQuery.cs

333 lines
11 KiB
C#
Raw Normal View History

using MediaBrowser.Model.Entities;
2013-02-21 02:33:05 +01:00
using System;
2013-03-10 06:36:39 +01:00
namespace MediaBrowser.Model.Querying
2013-02-21 02:33:05 +01: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 02:33:05 +01: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 05:22:36 +01:00
public string[] SortBy { get; set; }
2013-02-21 02:33:05 +01:00
2013-04-24 16:30:12 +02:00
/// <summary>
2015-03-13 18:25:28 +01:00
/// Gets or sets the artist ids.
2013-04-24 16:30:12 +02:00
/// </summary>
2015-03-13 18:25:28 +01:00
/// <value>The artist ids.</value>
public string[] ArtistIds { get; set; }
2013-02-21 02:33:05 +01: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 17:22:39 +02: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 20:10:39 +02:00
public bool? Is3D { get; set; }
2013-04-04 17:22:39 +02:00
/// <summary>
/// Gets or sets the video types.
/// </summary>
/// <value>The video types.</value>
public VideoType[] VideoTypes { get; set; }
2013-04-21 03:17:59 +02:00
2013-02-21 02:33:05 +01: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 19:45:03 +01:00
/// Gets or sets the studio ids.
2013-02-21 02:33:05 +01:00
/// </summary>
2015-03-13 19:45:03 +01:00
/// <value>The studio ids.</value>
public string[] StudioIds { get; set; }
2013-02-21 02:33:05 +01: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 03:17:59 +02:00
2013-02-21 02:33:05 +01: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 17:40:16 +01:00
public string[] PersonIds { get; set; }
2013-02-21 02:33:05 +01: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-14 01:43:41 +02:00
public string[] PersonTypes { get; set; }
2013-02-21 02:33:05 +01:00
/// <summary>
/// Search characters used to find items
/// </summary>
/// <value>The index by.</value>
public string SearchTerm { get; set; }
2013-04-21 03:17:59 +02:00
2013-02-21 02:33:05 +01:00
/// <summary>
/// Gets or sets the image types.
/// </summary>
/// <value>The image types.</value>
public ImageType[] ImageTypes { get; set; }
2013-03-16 06:52:33 +01: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 03:17:59 +02:00
2013-03-16 06:52:33 +01: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 02:17:25 +02: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 03:17:59 +02:00
2013-09-13 22:45:27 +02:00
/// <summary>
/// Gets or sets the min index number.
/// </summary>
/// <value>The min index number.</value>
public int? MinIndexNumber { get; set; }
2013-09-11 19:54:59 +02:00
2013-09-13 22:45:27 +02: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 19:54:59 +02:00
public bool? HasParentalRating { get; set; }
2013-09-13 22:45:27 +02: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 19:54:59 +02:00
public bool? IsHD { get; set; }
2013-09-13 22:45:27 +02:00
/// <summary>
/// Gets or sets the parent index number.
/// </summary>
/// <value>The parent index number.</value>
public int? ParentIndexNumber { get; set; }
2013-10-03 03:22:50 +02:00
/// <summary>
/// Gets or sets the min players.
/// </summary>
/// <value>The min players.</value>
public int? MinPlayers { get; set; }
2013-10-06 05:03:08 +02:00
/// <summary>
/// Gets or sets the max players.
/// </summary>
/// <value>The max players.</value>
public int? MaxPlayers { get; set; }
2014-12-03 04:13:03 +01:00
2013-10-03 03:22:50 +02: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 03:59:48 +01:00
/// <summary>
2014-03-05 22:46:32 +01: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 04:13:03 +01:00
2014-03-06 03:59:48 +01:00
/// <summary>
2014-03-05 22:46:32 +01:00
/// Gets or sets the name starts with.
/// </summary>
/// <value>The name lessthan.</value>
public string NameLessThan { get; set; }
2013-10-03 03:22:50 +02: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-16 00:16:39 +02: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-27 00:01:21 +02: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-27 00:40:53 +02:00
public bool? IsVirtualUnaired { get; set; }
2014-01-19 20:25:29 +01:00
public bool? IsInBoxSet { get; set; }
2014-03-18 15:54:47 +01:00
public bool? CollapseBoxSetItems { get; set; }
2014-01-19 20:25:29 +01:00
public bool? IsPlayed { get; set; }
2014-12-03 04:13:03 +01:00
/// <summary>
/// Gets or sets the exclude location types.
/// </summary>
/// <value>The exclude location types.</value>
public LocationType[] ExcludeLocationTypes { get; set; }
2013-11-03 17:19:33 +01:00
public double? MinCommunityRating { get; set; }
public double? MinCriticRating { get; set; }
2013-11-15 22:31:33 +01:00
public int? AiredDuringSeason { get; set; }
public DateTime? MinPremiereDate { get; set; }
public DateTime? MaxPremiereDate { get; set; }
2014-12-01 13:43:34 +01:00
public bool? EnableImages { get; set; }
public int? ImageTypeLimit { get; set; }
2014-12-03 04:13:03 +01:00
public ImageType[] EnableImageTypes { get; set; }
2015-04-03 17:52:49 +02:00
[Obsolete]
public string[] Artists { get; set; }
[Obsolete]
public string[] Studios { get; set; }
[Obsolete]
public string Person { get; set; }
2016-05-17 21:18:50 +02:00
public bool EnableTotalRecordCount { get; set; }
2013-04-21 03:17:59 +02:00
/// <summary>
2013-09-13 22:45:27 +02:00
/// Initializes a new instance of the <see cref="ItemQuery" /> class.
2013-04-21 03:17:59 +02:00
/// </summary>
public ItemQuery()
{
LocationTypes = new LocationType[] { };
ExcludeLocationTypes = new LocationType[] { };
2014-12-03 04:13:03 +01:00
SortBy = new string[] { };
2013-04-21 03:17:59 +02:00
2014-12-03 04:13:03 +01:00
Filters = new ItemFilter[] { };
2013-04-21 03:17:59 +02:00
2014-12-03 04:13:03 +01:00
Fields = new ItemFields[] { };
2013-04-21 03:17:59 +02:00
2014-12-03 04:13:03 +01:00
MediaTypes = new string[] { };
2013-04-21 03:17:59 +02:00
2014-12-03 04:13:03 +01:00
VideoTypes = new VideoType[] { };
2013-04-21 03:17:59 +02:00
2016-05-17 21:18:50 +02:00
EnableTotalRecordCount = true;
2015-04-03 17:52:49 +02:00
Artists = new string[] { };
Studios = new string[] { };
2013-04-21 03:17:59 +02:00
Genres = new string[] { };
2015-03-13 19:45:03 +01:00
StudioIds = new string[] { };
2013-04-21 03:17:59 +02:00
IncludeItemTypes = new string[] { };
ExcludeItemTypes = new string[] { };
Years = new int[] { };
PersonTypes = new string[] { };
Ids = new string[] { };
2015-03-13 18:25:28 +01:00
ArtistIds = new string[] { };
2015-03-18 17:40:16 +01:00
PersonIds = new string[] { };
2013-04-21 03:17:59 +02:00
ImageTypes = new ImageType[] { };
AirDays = new DayOfWeek[] { };
SeriesStatuses = new SeriesStatus[] { };
2014-12-03 04:13:03 +01:00
EnableImageTypes = new ImageType[] { };
2013-04-21 03:17:59 +02:00
}
2013-02-21 02:33:05 +01:00
}
}