Remove 'rock' from genre count

This commit is contained in:
Claudio Ortolina
2025-08-31 09:51:02 +03:00
parent 14d0343f34
commit d9391a803e
+2
View File
@@ -109,6 +109,8 @@ defmodule MusicLibrary.Collection do
q =
from r in fragment("records, json_each(records.genres)"),
where: fragment("records.purchased_at IS NOT NULL"),
# we remove rock as it's really generic and dwarfs other genres
where: fragment("? != 'rock'", r.value),
group_by: r.value,
order_by: [desc: fragment("count(1)")],
select: {r.value, fragment("count(1)")},