aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs18
-rw-r--r--MediaBrowser.Controller/Entities/InternalItemsQuery.cs4
2 files changed, 21 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index 438c5cf233..6a3f3ba192 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -1348,6 +1348,24 @@ namespace MediaBrowser.Controller.Entities
return LocalizationManager.GetRatingLevel(rating);
}
+ public List<string> GetInheritedTags()
+ {
+ var list = new List<string>();
+ list.AddRange(Tags);
+
+ foreach (var parent in GetParents())
+ {
+ list.AddRange(parent.Tags);
+ }
+
+ foreach (var parent in LibraryManager.GetCollectionFolders(this))
+ {
+ list.AddRange(parent.Tags);
+ }
+
+ return list.Distinct(StringComparer.OrdinalIgnoreCase).ToList();
+ }
+
private bool IsVisibleViaTags(User user)
{
var hasTags = this as IHasTags;
diff --git a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
index b568aec180..fbf246b3ab 100644
--- a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
+++ b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
@@ -33,6 +33,7 @@ namespace MediaBrowser.Controller.Entities
public string[] IncludeItemTypes { get; set; }
public string[] ExcludeItemTypes { get; set; }
public string[] ExcludeTags { get; set; }
+ public string[] ExcludeInheritedTags { get; set; }
public string[] Genres { get; set; }
public bool? IsMissing { get; set; }
@@ -157,6 +158,7 @@ namespace MediaBrowser.Controller.Entities
AncestorIds = new string[] { };
TopParentIds = new string[] { };
ExcludeTags = new string[] { };
+ ExcludeInheritedTags = new string[] { };
LocationTypes = new LocationType[] { };
ExcludeLocationTypes = new LocationType[] { };
PresetViews = new string[] { };
@@ -181,7 +183,7 @@ namespace MediaBrowser.Controller.Entities
BlockUnratedItems = policy.BlockUnratedItems;
}
- ExcludeTags = policy.BlockedTags;
+ ExcludeInheritedTags = policy.BlockedTags;
User = user;
}