Improve error handling for color extraction
Includes a around embedding generation, which was happening twice (the first call was redundant as record embeddings are always regenerated after their parent artist embeddings are regenerated). Closes #144.
This commit is contained in:
@@ -51,6 +51,13 @@ defmodule MusicLibrary.RecordsTest do
|
||||
assert Enum.all?(record.dominant_colors, &color_hex?/1)
|
||||
end
|
||||
|
||||
@tag :capture_log
|
||||
test "succeeds when color extraction fails" do
|
||||
record = record(dominant_colors: [], cover_hash: "nonexistent_hash")
|
||||
|
||||
assert record.dominant_colors == []
|
||||
end
|
||||
|
||||
test "queues a task to retrieve artist info data" do
|
||||
record =
|
||||
record(musicbrainz_data: release_group(:lockdown_trilogy))
|
||||
|
||||
Reference in New Issue
Block a user