Add status for each track in the scrobble activity
This commit is contained in:
@@ -46,6 +46,16 @@ defmodule MusicLibrary.Collection do
|
||||
Repo.one!(q)
|
||||
end
|
||||
|
||||
def collected_release_ids(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
|
||||
|
||||
Repo.all(q)
|
||||
end
|
||||
|
||||
defp base_search do
|
||||
from r in Record,
|
||||
where: not is_nil(r.purchased_at)
|
||||
|
||||
Reference in New Issue
Block a user