The Free Software Media System - Server Backend & API
revert the last bits of the getcount experiment
cviuma6726730fc18
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.csindex bd5a3e30b1..7cee309d09 100644--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs@@ -2621,21 +2621,10 @@ namespace Emby.Server.Implementations.Dataquery.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)