Render recently scrobbled tracks in stats
This commit is contained in:
@@ -6,15 +6,11 @@ defmodule LastFm.Supervisor do
|
||||
end
|
||||
|
||||
@impl true
|
||||
def init(opts) do
|
||||
def init(_opts) do
|
||||
:ok = LastFm.Feed.create_table!()
|
||||
|
||||
api =
|
||||
Keyword.fetch!(opts, :api)
|
||||
|> IO.inspect()
|
||||
|
||||
children = [
|
||||
{LastFm.Refresh, %{api: api, user: "cloud8421", api_key: api_key()}}
|
||||
{LastFm.Refresh, %{api: api(), user: "cloud8421", api_key: api_key()}}
|
||||
]
|
||||
|
||||
Supervisor.init(children, strategy: :one_for_one)
|
||||
@@ -24,4 +20,8 @@ defmodule LastFm.Supervisor do
|
||||
Application.get_env(:music_library, LastFm, [])
|
||||
|> Keyword.get(:api_key)
|
||||
end
|
||||
|
||||
defp api do
|
||||
Application.get_env(:music_library, :last_fm, LastFm.APIImpl)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user