Link to wishlisted albums in scrobble activity

This commit is contained in:
Claudio Ortolina
2025-01-01 16:15:02 +00:00
parent 5973206da3
commit 6a9d54f735
4 changed files with 21 additions and 19 deletions
+3 -3
View File
@@ -21,14 +21,14 @@ defmodule MusicLibrary.Wishlist do
Repo.aggregate(base_search(), :count)
end
def wishlisted_release_ids(release_ids) do
def wishlisted_releases(release_ids) do
q =
from r in fragment("records, json_each(records.release_ids)"),
where: r.value in ^release_ids,
where: fragment("records.purchased_at IS NULL"),
select: r.value
select: %{record_id: fragment("records.id"), release_id: r.value}
q |> Repo.all() |> MapSet.new()
q |> Repo.all()
end
defp base_search do