Provide default record set counts

This commit is contained in:
Claudio Ortolina
2026-02-07 10:42:28 +00:00
parent 84159a1c0d
commit 4524dc757c
@@ -28,6 +28,8 @@ defmodule MusicLibrary.RecordSets.RecordSet do
if item.record.purchased_at, do: :collected, else: :wishlisted
end)
|> Map.new()
|> Map.put_new(:collected, 0)
|> Map.put_new(:wishlisted, 0)
|> Map.put(:total, Enum.count(record_set.items))
end
end