Tidying up code

This commit is contained in:
Neil Burrows 2019-12-13 11:08:19 +00:00
parent 554c967dd6
commit 12bb4a92eb

View File

@ -4594,17 +4594,10 @@ namespace Emby.Server.Implementations.Data
if (query.ExcludeInheritedTags.Length > 0) if (query.ExcludeInheritedTags.Length > 0)
{ {
var paramName = "@ExcludeInheritedTags"; var paramName = "@ExcludeInheritedTags";
if (statement == null) if (statement == null)
{ {
List<string> tagParamList = new List<string>(); int index = 0;
whereClauses.Add("((select CleanValue from itemvalues where ItemId=Guid and Type=6 and cleanvalue in (" + string.Join(",", query.ExcludeInheritedTags.Select(t => paramName + index++)) + ")) is null)");
for (int index = 0; index < query.ExcludeInheritedTags.Length; index++)
{
tagParamList.Add(paramName + index);
}
whereClauses.Add("((select CleanValue from itemvalues where ItemId=Guid and Type=6 and cleanvalue in (" + string.Join(",", tagParamList) + ")) is null)");
} }
else else
{ {