diff options
Diffstat (limited to 'lib/lsg/icecast.ex')
-rw-r--r-- | lib/lsg/icecast.ex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/lsg/icecast.ex b/lib/lsg/icecast.ex index 21a9ea2..07dd4fc 100644 --- a/lib/lsg/icecast.ex +++ b/lib/lsg/icecast.ex @@ -1,7 +1,6 @@ defmodule LSG.Icecast do use GenServer require Logger - @interval 2_500 @hackney_pool :default @httpoison_opts [hackney: [pool: @hackney_pool]] @fuse __MODULE__ @@ -42,7 +41,8 @@ defmodule LSG.Icecast do Logger.error "Icecast HTTP Error: #{inspect error}" state end - :timer.send_after(@interval, :poll) + interval = Application.get_env(:lsg, :icecast_poll_interval, 60_000) + :timer.send_after(interval, :poll) state end @@ -83,7 +83,7 @@ defmodule LSG.Icecast do end defp request(uri, method, body \\ [], headers \\ []) do - headers = [{"user-agent", "LSG-API[lsg.goulag.org] href@random.sh"}] ++ headers + headers = [{"user-agent", "LSG-API[115ans.net, sys.115ans.net] href@random.sh"}] ++ headers options = @httpoison_opts case :ok do #:fuse.ask(@fuse, :sync) do :ok -> run_request(method, uri, body, headers, options) |