mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 19:37:55 +02:00
commit
89d6d82183
2 changed files with 6 additions and 10 deletions
|
@ -3618,7 +3618,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||
|
||||
var whereText = " where Type=@SelectType";
|
||||
whereText += " And CleanName In (Select CleanValue from ItemValues where Type=@ItemValueType AND ItemId in (select guid from TypedBaseItems" + innerWhereText + "))";
|
||||
cmd.CommandText += whereText;
|
||||
|
||||
var outerQuery = new InternalItemsQuery(query.User)
|
||||
{
|
||||
|
@ -3638,10 +3637,13 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||
|
||||
var outerWhereClauses = GetWhereClauses(outerQuery, cmd);
|
||||
|
||||
var outerWhereText = outerWhereClauses.Count == 0 ?
|
||||
whereText += outerWhereClauses.Count == 0 ?
|
||||
string.Empty :
|
||||
" AND " + string.Join(" AND ", outerWhereClauses.ToArray());
|
||||
cmd.CommandText += outerWhereText;
|
||||
//cmd.CommandText += GetGroupBy(query);
|
||||
|
||||
cmd.CommandText += whereText;
|
||||
cmd.CommandText += " group by PresentationUniqueKey";
|
||||
|
||||
cmd.Parameters.Add(cmd, "@SelectType", DbType.String).Value = returnType;
|
||||
cmd.Parameters.Add(cmd, "@ItemValueType", DbType.Int32).Value = itemValueType;
|
||||
|
@ -3651,9 +3653,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||
cmd.Parameters.Add(cmd, "@UserId", DbType.Guid).Value = query.User.Id;
|
||||
}
|
||||
|
||||
//cmd.CommandText += GetGroupBy(query);
|
||||
cmd.CommandText += " group by PresentationUniqueKey";
|
||||
|
||||
cmd.CommandText += " order by SortName";
|
||||
|
||||
if (query.Limit.HasValue || query.StartIndex.HasValue)
|
||||
|
@ -3679,7 +3678,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||
|
||||
if (query.EnableTotalRecordCount)
|
||||
{
|
||||
cmd.CommandText += "select count (guid)" + GetFromText();
|
||||
cmd.CommandText += "select count (distinct PresentationUniqueKey)" + GetFromText();
|
||||
|
||||
cmd.CommandText += GetJoinUserDataText(query);
|
||||
cmd.CommandText += whereText;
|
||||
|
|
|
@ -965,9 +965,6 @@
|
|||
<Content Include="dashboard-ui\scripts\metadatasubtitles.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\scripts\musicalbumartists.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\scripts\livetvchannels.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
|
Loading…
Reference in a new issue