aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Data/SqliteItemRepository.cs
diff options
context:
space:
mode:
authorcvium <clausvium@gmail.com>2021-04-30 15:11:16 +0200
committercvium <clausvium@gmail.com>2021-04-30 15:11:16 +0200
commita6726730fc181599db0ba68545adce9b88c11f7b (patch)
treec9b0930e7b1f1c4d535f930ee7f6194bda831971 /Emby.Server.Implementations/Data/SqliteItemRepository.cs
parent608cba817c54df60959079719bafca4d7d54269a (diff)
revert the last bits of the getcount experiment
Diffstat (limited to 'Emby.Server.Implementations/Data/SqliteItemRepository.cs')
-rw-r--r--Emby.Server.Implementations/Data/SqliteItemRepository.cs19
1 files changed, 4 insertions, 15 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
index bd5a3e30b..7cee309d0 100644
--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
@@ -2621,21 +2621,10 @@ namespace Emby.Server.Implementations.Data
query.Limit = query.Limit.Value + 4;
}
- var commandText = "select ";
- if (EnableGroupByPresentationUniqueKey(query))
- {
- commandText += "count (distinct PresentationUniqueKey)";
- }
- else if (query.GroupBySeriesPresentationUniqueKey)
- {
- commandText += "count (distinct SeriesPresentationUniqueKey)";
- }
- else
- {
- commandText += "count (guid)";
- }
-
- commandText += GetFromText() + GetJoinUserDataText(query);
+ var commandText = "select "
+ + string.Join(',', GetFinalColumnsToSelect(query, new[] { "count(distinct PresentationUniqueKey)" }))
+ + GetFromText()
+ + GetJoinUserDataText(query);
var whereClauses = GetWhereClauses(query, null);
if (whereClauses.Count != 0)