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