Consolidate Last.fm fallback cover handling

This commit is contained in:
Claudio Ortolina
2025-09-26 15:36:30 +03:00
parent 36bc9266b3
commit 124bbe2b1d
3 changed files with 8 additions and 6 deletions
+6
View File
@@ -76,5 +76,11 @@ defmodule LastFm do
"https://www.last.fm/api/auth/?api_key=" <> last_fm_config.api_key
end
@last_fm_fallback_cover_url "https://lastfm.freetls.fastly.net/i/u/64s/2a96cbd8b46e442fc41c2b86b821562f.png"
def fallback_cover?(cover_url) do
cover_url == @last_fm_fallback_cover_url
end
defp last_fm_config, do: LastFm.Config.resolve(:music_library)
end