mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-08 19:28:38 +01:00
wip
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
dd635c4e30
commit
8d4feb242b
29 changed files with 627 additions and 592 deletions
|
|
@ -24,10 +24,17 @@ func (r sqlRepository) withAnnotation(query SelectBuilder, idField string) Selec
|
|||
"annotation.item_id = "+idField+
|
||||
" AND annotation.user_id = '"+userID+"')").
|
||||
Columns(
|
||||
"coalesce(starred, 0) as starred",
|
||||
"coalesce(starred, false) as starred",
|
||||
"coalesce(rating, 0) as rating",
|
||||
"starred_at",
|
||||
"play_date",
|
||||
"play_date").
|
||||
GroupBy(
|
||||
idField,
|
||||
"annotation.starred",
|
||||
"annotation.rating",
|
||||
"annotation.starred_at",
|
||||
"annotation.play_date",
|
||||
"annotation.play_count",
|
||||
)
|
||||
if conf.Server.AlbumPlayCountMode == consts.AlbumPlayCountModeNormalized && r.tableName == "album" {
|
||||
query = query.Columns(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue