using MediaBrowser.Model.Entities; using System; namespace MediaBrowser.Model.Querying { /// /// Contains all the possible parameters that can be used to query for items /// public class ItemQuery { /// /// The user to localize search results for /// /// The user id. public string UserId { get; set; } /// /// Specify this to localize the search to a specific item or folder. Omit to use the root. /// /// The parent id. public string ParentId { get; set; } /// /// Skips over a given number of items within the results. Use for paging. /// /// The start index. public int? StartIndex { get; set; } /// /// The maximum number of items to return /// /// The limit. public int? Limit { get; set; } /// /// What to sort the results by /// /// The sort by. public string[] SortBy { get; set; } /// /// Gets or sets the artist ids. /// /// The artist ids. public string[] ArtistIds { get; set; } /// /// The sort order to return results with /// /// The sort order. public SortOrder? SortOrder { get; set; } /// /// Filters to apply to the results /// /// The filters. public ItemFilter[] Filters { get; set; } /// /// Fields to return within the items, in addition to basic information /// /// The fields. public ItemFields[] Fields { get; set; } /// /// Gets or sets the media types. /// /// The media types. public string[] MediaTypes { get; set; } /// /// Gets or sets the video formats. /// /// The video formats. public bool? Is3D { get; set; } /// /// Gets or sets the video types. /// /// The video types. public VideoType[] VideoTypes { get; set; } /// /// Whether or not to perform the query recursively /// /// true if recursive; otherwise, false. public bool Recursive { get; set; } /// /// Limit results to items containing specific genres /// /// The genres. public string[] Genres { get; set; } /// /// Gets or sets the studio ids. /// /// The studio ids. public string[] StudioIds { get; set; } /// /// Gets or sets the exclude item types. /// /// The exclude item types. public string[] ExcludeItemTypes { get; set; } /// /// Gets or sets the include item types. /// /// The include item types. public string[] IncludeItemTypes { get; set; } /// /// Limit results to items containing specific years /// /// The years. public int[] Years { get; set; } /// /// Limit results to items containing a specific person /// /// The person. public string[] PersonIds { get; set; } /// /// If the Person filter is used, this can also be used to restrict to a specific person type /// /// The type of the person. public string[] PersonTypes { get; set; } /// /// Search characters used to find items /// /// The index by. public string SearchTerm { get; set; } /// /// Gets or sets the image types. /// /// The image types. public ImageType[] ImageTypes { get; set; } /// /// Gets or sets the air days. /// /// The air days. public DayOfWeek[] AirDays { get; set; } /// /// Gets or sets the series status. /// /// The series status. public SeriesStatus[] SeriesStatuses { get; set; } /// /// Gets or sets the ids, which are specific items to retrieve /// /// The ids. public string[] Ids { get; set; } /// /// Gets or sets the min official rating. /// /// The min official rating. public string MinOfficialRating { get; set; } /// /// Gets or sets the max official rating. /// /// The max official rating. public string MaxOfficialRating { get; set; } /// /// Gets or sets the min index number. /// /// The min index number. public int? MinIndexNumber { get; set; } /// /// Gets or sets a value indicating whether this instance has parental rating. /// /// null if [has parental rating] contains no value, true if [has parental rating]; otherwise, false. public bool? HasParentalRating { get; set; } /// /// Gets or sets a value indicating whether this instance is HD. /// /// null if [is HD] contains no value, true if [is HD]; otherwise, false. public bool? IsHD { get; set; } /// /// Gets or sets the parent index number. /// /// The parent index number. public int? ParentIndexNumber { get; set; } /// /// Gets or sets the min players. /// /// The min players. public int? MinPlayers { get; set; } /// /// Gets or sets the max players. /// /// The max players. public int? MaxPlayers { get; set; } /// /// Gets or sets the name starts with or greater. /// /// The name starts with or greater. public string NameStartsWithOrGreater { get; set; } /// /// Gets or sets the name starts with. /// /// The name starts with or greater. public string NameStartsWith { get; set; } /// /// Gets or sets the name starts with. /// /// The name lessthan. public string NameLessThan { get; set; } /// /// Gets or sets the album artist starts with or greater. /// /// The album artist starts with or greater. public string AlbumArtistStartsWithOrGreater { get; set; } /// /// Gets or sets a value indicating whether [include index containers]. /// /// true if [include index containers]; otherwise, false. public bool IncludeIndexContainers { get; set; } /// /// Gets or sets the location types. /// /// The location types. public LocationType[] LocationTypes { get; set; } /// /// Gets or sets a value indicating whether this instance is missing episode. /// /// null if [is missing episode] contains no value, true if [is missing episode]; otherwise, false. public bool? IsMissing { get; set; } /// /// Gets or sets a value indicating whether this instance is unaired episode. /// /// null if [is unaired episode] contains no value, true if [is unaired episode]; otherwise, false. public bool? IsUnaired { get; set; } public bool? IsVirtualUnaired { get; set; } public bool? IsInBoxSet { get; set; } public bool? CollapseBoxSetItems { get; set; } public bool? IsPlayed { get; set; } /// /// Gets or sets the exclude location types. /// /// The exclude location types. public LocationType[] ExcludeLocationTypes { get; set; } public double? MinCommunityRating { get; set; } public double? MinCriticRating { get; set; } public int? AiredDuringSeason { get; set; } public DateTime? MinPremiereDate { get; set; } public DateTime? MaxPremiereDate { get; set; } public bool? EnableImages { get; set; } public int? ImageTypeLimit { get; set; } public ImageType[] EnableImageTypes { get; set; } [Obsolete] public string[] Artists { get; set; } [Obsolete] public string[] Studios { get; set; } [Obsolete] public string Person { get; set; } public bool EnableTotalRecordCount { get; set; } /// /// Initializes a new instance of the class. /// public ItemQuery() { LocationTypes = new LocationType[] { }; ExcludeLocationTypes = new LocationType[] { }; SortBy = new string[] { }; Filters = new ItemFilter[] { }; Fields = new ItemFields[] { }; MediaTypes = new string[] { }; VideoTypes = new VideoType[] { }; EnableTotalRecordCount = true; Artists = new string[] { }; Studios = new string[] { }; Genres = new string[] { }; StudioIds = new string[] { }; IncludeItemTypes = new string[] { }; ExcludeItemTypes = new string[] { }; Years = new int[] { }; PersonTypes = new string[] { }; Ids = new string[] { }; ArtistIds = new string[] { }; PersonIds = new string[] { }; ImageTypes = new ImageType[] { }; AirDays = new DayOfWeek[] { }; SeriesStatuses = new SeriesStatus[] { }; EnableImageTypes = new ImageType[] { }; } } }