Merge pull request #9139 from Jpuc1143/tag-whitelist

This commit is contained in:
Bond-009
2023-02-11 23:52:09 +01:00
committed by GitHub
7 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>();