aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-01-11 21:55:52 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-01-11 21:55:52 -0500
commit8a2e023e28dd546641571dd24be721397c9ee9e1 (patch)
treea8b086e4bf154636393b76481150fc84fc3c21fc /MediaBrowser.Controller/Entities/InternalItemsQuery.cs
parentba4ca10ae29a50ed452ed3d05f885b3fa81595e2 (diff)
parent355edfa2020d19b0fba6b09da40de4e66395d4b7 (diff)
Merge branch 'dev'
Conflicts: MediaBrowser.Controller/Entities/BaseItem.cs MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-apiclient/.bower.json MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/.bower.json MediaBrowser.WebDashboard/dashboard-ui/bower_components/iron-icons/.bower.json MediaBrowser.WebDashboard/dashboard-ui/bower_components/iron-icons/bower.json MediaBrowser.WebDashboard/dashboard-ui/strings/html/kk.json MediaBrowser.WebDashboard/dashboard-ui/strings/html/ru.json MediaBrowser.WebDashboard/dashboard-ui/strings/javascript/kk.json MediaBrowser.WebDashboard/dashboard-ui/strings/javascript/ru.json SharedVersion.cs
Diffstat (limited to 'MediaBrowser.Controller/Entities/InternalItemsQuery.cs')
-rw-r--r--MediaBrowser.Controller/Entities/InternalItemsQuery.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
index 785e2fd2b..96cd305a6 100644
--- a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
+++ b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
@@ -1,6 +1,7 @@
using MediaBrowser.Model.Entities;
using System;
using System.Collections.Generic;
+using MediaBrowser.Model.Configuration;
namespace MediaBrowser.Controller.Entities
{
@@ -30,6 +31,7 @@ namespace MediaBrowser.Controller.Entities
public string[] MediaTypes { get; set; }
public string[] IncludeItemTypes { get; set; }
public string[] ExcludeItemTypes { get; set; }
+ public string[] ExcludeTags { get; set; }
public string[] Genres { get; set; }
public bool? IsMissing { get; set; }
@@ -69,12 +71,15 @@ namespace MediaBrowser.Controller.Entities
public string[] Studios { get; set; }
public string[] StudioIds { get; set; }
+ public string[] GenreIds { get; set; }
public ImageType[] ImageTypes { get; set; }
public VideoType[] VideoTypes { get; set; }
+ public UnratedItem[] BlockUnratedItems { get; set; }
public int[] Years { get; set; }
public string[] Tags { get; set; }
public string[] OfficialRatings { get; set; }
+ public DateTime? MinPremiereDate { get; set; }
public DateTime? MinStartDate { get; set; }
public DateTime? MaxStartDate { get; set; }
public DateTime? MinEndDate { get; set; }
@@ -87,6 +92,7 @@ namespace MediaBrowser.Controller.Entities
public int? MinPlayers { get; set; }
public int? MaxPlayers { get; set; }
+ public int? MinIndexNumber { get; set; }
public double? MinCriticRating { get; set; }
public double? MinCommunityRating { get; set; }
@@ -101,9 +107,14 @@ namespace MediaBrowser.Controller.Entities
public LocationType? LocationType { get; set; }
public Guid? ParentId { get; set; }
+ public string[] AncestorIds { get; set; }
+ public string[] TopParentIds { get; set; }
+
+ public LocationType[] ExcludeLocationTypes { get; set; }
public InternalItemsQuery()
{
+ BlockUnratedItems = new UnratedItem[] { };
Tags = new string[] { };
OfficialRatings = new string[] { };
SortBy = new string[] { };
@@ -113,6 +124,7 @@ namespace MediaBrowser.Controller.Entities
Genres = new string[] { };
Studios = new string[] { };
StudioIds = new string[] { };
+ GenreIds = new string[] { };
ImageTypes = new ImageType[] { };
VideoTypes = new VideoType[] { };
Years = new int[] { };
@@ -120,6 +132,29 @@ namespace MediaBrowser.Controller.Entities
PersonIds = new string[] { };
ChannelIds = new string[] { };
ItemIds = new string[] { };
+ AncestorIds = new string[] { };
+ TopParentIds = new string[] { };
+ ExcludeTags = new string[] { };
+ ExcludeLocationTypes = new LocationType[] { };
+ }
+
+ public InternalItemsQuery(User user)
+ : this()
+ {
+ if (user != null)
+ {
+ var policy = user.Policy;
+ MaxParentalRating = policy.MaxParentalRating;
+
+ if (policy.MaxParentalRating.HasValue)
+ {
+ BlockUnratedItems = policy.BlockUnratedItems;
+ }
+
+ ExcludeTags = policy.BlockedTags;
+
+ User = user;
+ }
}
}
}