Consolidate cover resize logic
Moves resizing out of the MusicBrainz namespace to Records - which improves division of responsibilities, and removes double resizing during import.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
defmodule MusicLibrary.Records.Cover do
|
||||
def resize(cover_data) do
|
||||
{:ok, thumb} = Vix.Vips.Operation.thumbnail_buffer(cover_data, 600)
|
||||
Vix.Vips.Image.write_to_buffer(thumb, ".jpg")
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user