Use LastFm.Config where needed

This commit is contained in:
Claudio Ortolina
2024-12-03 09:18:55 +00:00
parent b49434b789
commit 2094c1cf7b
6 changed files with 36 additions and 34 deletions
+1 -6
View File
@@ -15,7 +15,7 @@ defmodule MusicLibrary.Application do
{DNSCluster, query: Application.get_env(:music_library, :dns_cluster_query) || :ignore},
{Phoenix.PubSub, name: MusicLibrary.PubSub},
MusicBrainz.Supervisor,
{LastFm.Supervisor, last_fm_config()},
{LastFm.Supervisor, LastFm.Config.resolve(:music_library)},
# Start a worker by calling: MusicLibrary.Worker.start_link(arg)
# {MusicLibrary.Worker, arg},
# Start to serve requests, typically the last entry
@@ -40,9 +40,4 @@ defmodule MusicLibrary.Application do
# By default, sqlite migrations are run when using a release
System.get_env("RELEASE_NAME") != nil
end
defp last_fm_config do
Application.get_env(:music_library, LastFm)
|> LastFm.Config.new()
end
end