Don't apply fallback cover when refreshing it

So that we don't accidentally override a user-uploaded cover with the
fallback one.
This commit is contained in:
Claudio Ortolina
2024-11-21 17:57:49 +00:00
parent d09212dabb
commit 4581666282
6 changed files with 27 additions and 10 deletions
+1 -5
View File
@@ -405,10 +405,6 @@ defmodule MusicBrainz.APIImpl do
end
end
@fallback_cover File.read!(
(:code.priv_dir(:music_library) |> to_string()) <> "/cover-not-found.jpg"
)
@doc """
Uses the [cover art](https://musicbrainz.org/doc/Cover_Art_Archive/API) endpoint with the release group id to get the cover image.
"""
@@ -427,7 +423,7 @@ defmodule MusicBrainz.APIImpl do
{:error, reason} ->
Logger.error("Failed to fetch cover art for #{url}, reason: #{inspect(reason)}")
{:ok, @fallback_cover}
{:error, :cover_not_available}
end
end