diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-12-20 14:59:25 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-12-20 14:59:25 -0500 |
| commit | ac2c45dd6a2a932ce950069a4d3644b18c8037e0 (patch) | |
| tree | b99e268ff60ca0b7fa55d5beeb4195dfd006ad63 /Emby.Server.Implementations/Data/SqliteItemRepository.cs | |
| parent | 74ec6e5a06679e5360b9e8daf00fea40de4c699a (diff) | |
update dlna genre views
Diffstat (limited to 'Emby.Server.Implementations/Data/SqliteItemRepository.cs')
| -rw-r--r-- | Emby.Server.Implementations/Data/SqliteItemRepository.cs | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index 151702905..8e6a277a4 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -3855,16 +3855,18 @@ namespace Emby.Server.Implementations.Data } } - if (query.ArtistNames.Length > 0) + if (query.ArtistIds.Length > 0) { var clauses = new List<string>(); var index = 0; - foreach (var artist in query.ArtistNames) + foreach (var artistId in query.ArtistIds) { - clauses.Add("@ArtistName" + index + " in (select CleanValue from itemvalues where ItemId=Guid and Type <= 1)"); + var paramName = "@ArtistIds" + index; + + clauses.Add("(select CleanName from TypedBaseItems where guid=" + paramName + ") in (select CleanValue from itemvalues where ItemId=Guid and Type<=1)"); if (statement != null) { - statement.TryBind("@ArtistName" + index, GetCleanValue(artist)); + statement.TryBind(paramName, artistId.ToGuidParamValue()); } index++; } @@ -3963,23 +3965,6 @@ namespace Emby.Server.Implementations.Data whereClauses.Add(clause); } - if (query.Studios.Length > 0) - { - var clauses = new List<string>(); - var index = 0; - foreach (var item in query.Studios) - { - clauses.Add("@Studio" + index + " in (select CleanValue from itemvalues where ItemId=Guid and Type=3)"); - if (statement != null) - { - statement.TryBind("@Studio" + index, GetCleanValue(item)); - } - index++; - } - var clause = "(" + string.Join(" OR ", clauses.ToArray()) + ")"; - whereClauses.Add(clause); - } - if (query.Keywords.Length > 0) { var clauses = new List<string>(); |
