Link to artist page in count by artist chart

This commit is contained in:
Claudio Ortolina
2025-04-06 17:49:22 +01:00
parent 4fdd2e7ea6
commit 6777d716fa
2 changed files with 9 additions and 5 deletions
+5 -1
View File
@@ -77,7 +77,11 @@ defmodule MusicLibrary.Collection do
where: fragment("records.purchased_at IS NOT NULL"),
group_by: fragment("json_extract(?, '$.name')", r.value),
order_by: [desc: fragment("count(1)")],
select: {fragment("json_extract(?, '$.name')", r.value), fragment("count(1)")},
select: %{
id: fragment("json_extract(?, '$.musicbrainz_id')", r.value),
name: fragment("json_extract(?, '$.name')", r.value),
count: fragment("count(1)")
},
limit: ^limit
Repo.all(q)