revert the last bits of the getcount experiment

This commit is contained in:
cvium 2021-04-30 15:11:16 +02:00
parent 608cba817c
commit a6726730fc

View File

@ -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)