aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Entities')
-rw-r--r--MediaBrowser.Controller/Entities/InternalItemsQuery.cs2
-rw-r--r--MediaBrowser.Controller/Entities/UserViewBuilder.cs14
2 files changed, 15 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
index e1344009f..727f756f1 100644
--- a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
+++ b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
@@ -41,6 +41,7 @@ namespace MediaBrowser.Controller.Entities
public string NameLessThan { get; set; }
public string Person { get; set; }
+ public string[] PersonIds { get; set; }
public string AdjacentTo { get; set; }
public string[] PersonTypes { get; set; }
@@ -87,6 +88,7 @@ namespace MediaBrowser.Controller.Entities
VideoTypes = new VideoType[] { };
Years = new int[] { };
PersonTypes = new string[] { };
+ PersonIds = new string[] { };
}
}
}
diff --git a/MediaBrowser.Controller/Entities/UserViewBuilder.cs b/MediaBrowser.Controller/Entities/UserViewBuilder.cs
index 2f182273b..f21add553 100644
--- a/MediaBrowser.Controller/Entities/UserViewBuilder.cs
+++ b/MediaBrowser.Controller/Entities/UserViewBuilder.cs
@@ -115,6 +115,7 @@ namespace MediaBrowser.Controller.Entities
case CollectionType.Books:
case CollectionType.Photos:
case CollectionType.HomeVideos:
+ case CollectionType.MusicVideos:
return GetResult(queryParent.GetChildren(user, true), queryParent, query);
case CollectionType.Folders:
@@ -1056,6 +1057,11 @@ namespace MediaBrowser.Controller.Entities
return false;
}
+ if (request.PersonIds.Length > 0)
+ {
+ return false;
+ }
+
if (request.Studios.Length > 0)
{
return false;
@@ -1632,7 +1638,13 @@ namespace MediaBrowser.Controller.Entities
}
// Apply person filter
- if (!string.IsNullOrEmpty(query.Person))
+ if (query.PersonIds.Length > 0 && !(query.PersonIds.Any(v => item.People.Select(i => i.Name).Contains(v, StringComparer.OrdinalIgnoreCase))))
+ {
+ return false;
+ }
+
+ // Apply person filter
+ if (!string.IsNullOrWhiteSpace(query.Person))
{
var personTypes = query.PersonTypes;