浏览代码

Tidying up code

Neil Burrows 5 年之前
父节点
当前提交
12bb4a92eb
共有 1 个文件被更改,包括 2 次插入9 次删除
  1. 2 9
      Emby.Server.Implementations/Data/SqliteItemRepository.cs

+ 2 - 9
Emby.Server.Implementations/Data/SqliteItemRepository.cs

@@ -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>();
-
-                    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)");
+                    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)");
                 }
                 }
                 else
                 else
                 {
                 {