diff options
| author | Bond-009 <bond.009@outlook.com> | 2023-02-11 23:52:09 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-11 23:52:09 +0100 |
| commit | f5417c50f758309d2a293c400402bda8a911664e (patch) | |
| tree | 28ea17b90aa0d372a9c4e9826fede2eb965e7333 /Emby.Server.Implementations/Data/SqliteItemRepository.cs | |
| parent | 7b1bd9f234b0404007a9331c6a133f8a9a241ae0 (diff) | |
| parent | cb61a57e828f1e35b32cdb020a57bb4df35a5b3a (diff) | |
Merge pull request #9139 from Jpuc1143/tag-whitelist
Diffstat (limited to 'Emby.Server.Implementations/Data/SqliteItemRepository.cs')
| -rw-r--r-- | Emby.Server.Implementations/Data/SqliteItemRepository.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index bc703fe90..e828bfabf 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -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>(); |
