Display online stores favicon URLs via Google API

This commit is contained in:
Claudio Ortolina
2025-07-15 15:58:46 +01:00
parent 4add3859fd
commit 27e9f565e4
3 changed files with 18 additions and 2 deletions
@@ -75,4 +75,9 @@ defmodule MusicLibrary.OnlineStoreTemplates do
|> String.replace("{title}", URI.encode_www_form(record.title))
|> String.replace("{format}", URI.encode_www_form(format_string))
end
def favicon_url(template) do
uri = URI.parse(template.url_template)
"https://www.google.com/s2/favicons?domain=#{uri.host}&sz=16"
end
end