Link to collected albums in scrobble activity

This commit is contained in:
Claudio Ortolina
2025-01-01 16:11:14 +00:00
parent 48a4b308cc
commit 5973206da3
4 changed files with 24 additions and 16 deletions
+3 -3
View File
@@ -50,14 +50,14 @@ defmodule MusicLibrary.Collection do
Repo.one!(q)
end
def collected_release_ids(release_ids) do
def collected_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 NOT 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