jellyfin/MediaBrowser.Controller/Entities/InternalItemsQuery.cs

193 lines
7.1 KiB
C#
Raw Normal View History

2015-07-28 19:42:24 +00:00
using MediaBrowser.Model.Entities;
using System;
2015-07-28 19:42:24 +00:00
using System.Collections.Generic;
2015-11-06 15:02:22 +00:00
using MediaBrowser.Model.Configuration;
namespace MediaBrowser.Controller.Entities
{
2014-10-06 23:58:46 +00:00
public class InternalItemsQuery
{
public bool Recursive { get; set; }
public int? StartIndex { get; set; }
public int? Limit { get; set; }
public string[] SortBy { get; set; }
public SortOrder SortOrder { get; set; }
public User User { get; set; }
2015-01-25 06:34:50 +00:00
public Func<BaseItem, bool> Filter { get; set; }
public bool? IsFolder { get; set; }
public bool? IsFavorite { get; set; }
2014-10-06 23:58:46 +00:00
public bool? IsFavoriteOrLiked { get; set; }
public bool? IsLiked { get; set; }
public bool? IsPlayed { get; set; }
public bool? IsResumable { get; set; }
2016-02-14 17:58:31 +00:00
public bool? IncludeItemsByName { get; set; }
public string[] MediaTypes { get; set; }
2014-10-06 23:58:46 +00:00
public string[] IncludeItemTypes { get; set; }
public string[] ExcludeItemTypes { get; set; }
2015-11-15 22:30:47 +00:00
public string[] ExcludeTags { get; set; }
2016-04-15 02:39:39 +00:00
public string[] ExcludeInheritedTags { get; set; }
2014-10-08 01:37:45 +00:00
public string[] Genres { get; set; }
public bool? IsMissing { get; set; }
public bool? IsUnaired { get; set; }
public bool? IsVirtualUnaired { get; set; }
public bool? CollapseBoxSetItems { get; set; }
public string NameStartsWithOrGreater { get; set; }
public string NameStartsWith { get; set; }
public string NameLessThan { get; set; }
2015-07-18 19:32:59 +00:00
public string NameContains { get; set; }
2014-10-08 01:37:45 +00:00
2016-03-01 19:39:46 +00:00
public string Path { get; set; }
2014-10-08 01:37:45 +00:00
public string Person { get; set; }
2015-03-18 16:40:16 +00:00
public string[] PersonIds { get; set; }
2015-07-14 19:04:16 +00:00
public string[] ItemIds { get; set; }
2014-10-08 01:37:45 +00:00
public string AdjacentTo { get; set; }
public string[] PersonTypes { get; set; }
public bool? Is3D { get; set; }
public bool? IsHD { get; set; }
public bool? IsInBoxSet { get; set; }
public bool? IsLocked { get; set; }
public bool? IsPlaceHolder { get; set; }
public bool? IsYearMismatched { get; set; }
public bool? HasImdbId { get; set; }
public bool? HasOverview { get; set; }
public bool? HasTmdbId { get; set; }
public bool? HasOfficialRating { get; set; }
public bool? HasTvdbId { get; set; }
public bool? HasThemeSong { get; set; }
public bool? HasThemeVideo { get; set; }
public bool? HasSubtitles { get; set; }
public bool? HasSpecialFeature { get; set; }
public bool? HasTrailer { get; set; }
public bool? HasParentalRating { get; set; }
public string[] Studios { get; set; }
2015-03-13 18:45:03 +00:00
public string[] StudioIds { get; set; }
2015-11-06 15:02:22 +00:00
public string[] GenreIds { get; set; }
2014-10-08 01:37:45 +00:00
public ImageType[] ImageTypes { get; set; }
public VideoType[] VideoTypes { get; set; }
2015-11-06 15:02:22 +00:00
public UnratedItem[] BlockUnratedItems { get; set; }
2014-10-08 01:37:45 +00:00
public int[] Years { get; set; }
public string[] Tags { get; set; }
public string[] OfficialRatings { get; set; }
2014-10-06 23:58:46 +00:00
2015-10-28 19:40:38 +00:00
public DateTime? MinPremiereDate { get; set; }
2016-03-20 06:46:51 +00:00
public DateTime? MaxPremiereDate { get; set; }
2015-06-01 14:49:23 +00:00
public DateTime? MinStartDate { get; set; }
public DateTime? MaxStartDate { get; set; }
public DateTime? MinEndDate { get; set; }
public DateTime? MaxEndDate { get; set; }
public bool? IsAiring { get; set; }
public bool? IsMovie { get; set; }
public bool? IsSports { get; set; }
2015-06-01 17:49:11 +00:00
public bool? IsKids { get; set; }
2015-07-14 19:04:16 +00:00
public int? MinPlayers { get; set; }
public int? MaxPlayers { get; set; }
2015-11-06 15:53:23 +00:00
public int? MinIndexNumber { get; set; }
2016-03-20 20:04:27 +00:00
public int? AiredDuringSeason { get; set; }
2015-07-14 19:04:16 +00:00
public double? MinCriticRating { get; set; }
public double? MinCommunityRating { get; set; }
2016-03-01 18:42:39 +00:00
2015-06-01 14:49:23 +00:00
public string[] ChannelIds { get; set; }
2015-07-14 19:04:16 +00:00
internal List<Guid> ItemIdsFromPersonFilters { get; set; }
2016-03-20 19:53:22 +00:00
public int? ParentIndexNumber { get; set; }
2016-03-21 03:10:37 +00:00
public int? MinParentalRating { get; set; }
2015-07-28 12:33:30 +00:00
public int? MaxParentalRating { get; set; }
2015-07-14 19:04:16 +00:00
2015-08-26 05:10:04 +00:00
public bool? IsCurrentSchema { get; set; }
2015-08-28 04:19:08 +00:00
public bool? HasDeadParentId { get; set; }
2015-09-16 17:16:39 +00:00
public bool? IsOffline { get; set; }
2015-09-24 02:31:40 +00:00
public Guid? ParentId { get; set; }
2015-10-29 13:28:05 +00:00
public string[] AncestorIds { get; set; }
2015-11-14 18:57:26 +00:00
public string[] TopParentIds { get; set; }
2015-10-29 19:01:04 +00:00
2016-03-20 19:53:22 +00:00
public LocationType[] LocationTypes { get; set; }
2015-10-29 19:01:04 +00:00
public LocationType[] ExcludeLocationTypes { get; set; }
2016-03-01 18:42:39 +00:00
public string[] PresetViews { get; set; }
2016-03-19 05:04:38 +00:00
public SourceType[] SourceTypes { get; set; }
2016-03-19 15:38:05 +00:00
public SourceType[] ExcludeSourceTypes { get; set; }
2016-03-19 19:32:37 +00:00
public TrailerType[] TrailerTypes { get; set; }
public TrailerType[] ExcludeTrailerTypes { get; set; }
2016-03-01 18:42:39 +00:00
2016-03-20 19:53:22 +00:00
public DayOfWeek[] AirDays { get; set; }
public SeriesStatus[] SeriesStatuses { get; set; }
2016-03-21 00:15:56 +00:00
public string AlbumArtistStartsWithOrGreater { get; set; }
2016-03-21 16:50:50 +00:00
public string[] AlbumNames { get; set; }
public string[] ArtistNames { get; set; }
2014-10-06 23:58:46 +00:00
public InternalItemsQuery()
{
2016-03-21 16:50:50 +00:00
AlbumNames = new string[] { };
ArtistNames = new string[] { };
2015-11-06 15:02:22 +00:00
BlockUnratedItems = new UnratedItem[] { };
Tags = new string[] { };
OfficialRatings = new string[] { };
SortBy = new string[] { };
MediaTypes = new string[] { };
2014-10-06 23:58:46 +00:00
IncludeItemTypes = new string[] { };
ExcludeItemTypes = new string[] { };
2014-10-08 01:37:45 +00:00
Genres = new string[] { };
Studios = new string[] { };
2015-03-13 18:45:03 +00:00
StudioIds = new string[] { };
2015-11-06 15:02:22 +00:00
GenreIds = new string[] { };
2014-10-08 01:37:45 +00:00
ImageTypes = new ImageType[] { };
VideoTypes = new VideoType[] { };
Years = new int[] { };
PersonTypes = new string[] { };
2015-03-18 16:40:16 +00:00
PersonIds = new string[] { };
2015-06-01 14:49:23 +00:00
ChannelIds = new string[] { };
2015-07-14 19:04:16 +00:00
ItemIds = new string[] { };
2015-10-29 13:28:05 +00:00
AncestorIds = new string[] { };
2015-11-14 18:57:26 +00:00
TopParentIds = new string[] { };
2015-11-15 22:30:47 +00:00
ExcludeTags = new string[] { };
2016-04-15 02:39:39 +00:00
ExcludeInheritedTags = new string[] { };
2016-03-20 19:53:22 +00:00
LocationTypes = new LocationType[] { };
2015-10-29 19:01:04 +00:00
ExcludeLocationTypes = new LocationType[] { };
2016-03-01 18:42:39 +00:00
PresetViews = new string[] { };
2016-03-19 05:04:38 +00:00
SourceTypes = new SourceType[] { };
2016-03-19 15:38:05 +00:00
ExcludeSourceTypes = new SourceType[] { };
2016-03-19 19:32:37 +00:00
TrailerTypes = new TrailerType[] { };
ExcludeTrailerTypes = new TrailerType[] { };
2016-03-20 19:53:22 +00:00
AirDays = new DayOfWeek[] { };
SeriesStatuses = new SeriesStatus[] { };
}
2015-10-28 19:40:38 +00:00
public InternalItemsQuery(User user)
: this()
{
if (user != null)
{
var policy = user.Policy;
MaxParentalRating = policy.MaxParentalRating;
2015-10-29 13:28:05 +00:00
2015-11-15 22:30:47 +00:00
if (policy.MaxParentalRating.HasValue)
{
BlockUnratedItems = policy.BlockUnratedItems;
}
2016-04-15 02:39:39 +00:00
ExcludeInheritedTags = policy.BlockedTags;
2016-03-01 18:42:39 +00:00
2015-10-29 13:28:05 +00:00
User = user;
2015-10-28 19:40:38 +00:00
}
}
}
}