Add "Allowed Tags" to Parental Controls

This commit is contained in:
Jpuc1143
2023-01-19 23:28:52 -03:00
parent 23ddeeda4c
commit 7fa6d4c81e
8 changed files with 40 additions and 1 deletions

View File

@@ -4477,6 +4477,24 @@ namespace Emby.Server.Implementations.Data
}
}
if (query.IncludeInheritedTags.Length > 0)
{
var paramName = "@IncludeInheritedTags";
if (statement is null)
{
int index = 0;
string includedTags = string.Join(',', query.IncludeInheritedTags.Select(_ => paramName + index++));
whereClauses.Add("((select CleanValue from ItemValues where ItemId=Guid and Type=6 and cleanvalue in (" + includedTags + ")) is not null)");
}
else
{
for (int index = 0; index < query.IncludeInheritedTags.Length; index++)
{
statement.TryBind(paramName + index, GetCleanValue(query.IncludeInheritedTags[index]));
}
}
}
if (query.SeriesStatuses.Length > 0)
{
var statuses = new List<string>();