summaryrefslogtreecommitdiff
path: root/lib/plugins/link/img_debrid_link.ex
diff options
context:
space:
mode:
authorJordan Bracco <href@random.sh>2025-06-25 19:22:59 +0200
committerJordan Bracco <href@random.sh>2025-06-25 19:22:59 +0200
commitc934e79e5852e05f714b2d542cc2678e287c49b8 (patch)
tree55779a0168260fce03e4775eacdd613ffc945588 /lib/plugins/link/img_debrid_link.ex
parentupdates (diff)
format.
Diffstat (limited to 'lib/plugins/link/img_debrid_link.ex')
-rw-r--r--lib/plugins/link/img_debrid_link.ex16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/plugins/link/img_debrid_link.ex b/lib/plugins/link/img_debrid_link.ex
index a2972eb..b46c430 100644
--- a/lib/plugins/link/img_debrid_link.ex
+++ b/lib/plugins/link/img_debrid_link.ex
@@ -16,17 +16,17 @@ defmodule Nola.Plugins.Link.ImgDebridLink do
@impl true
def expand(_uri, %{id: ids}, _opts) do
- with \
- {:ok, %HTTPoison.Response{status_code: 200, body: body}} <- HTTPoison.get("https://img.debrid-link.fr/api/v1/images/#{ids}/infos", [], []),
- {:ok, %{"success" => true, "value" => values}} <- Jason.decode(body)
- do
- items = for %{"name" => name, "url" => %{"direct" => direct_url}} <- values do
- "#{name}: #{direct_url}"
- end
+ with {:ok, %HTTPoison.Response{status_code: 200, body: body}} <-
+ HTTPoison.get("https://img.debrid-link.fr/api/v1/images/#{ids}/infos", [], []),
+ {:ok, %{"success" => true, "value" => values}} <- Jason.decode(body) do
+ items =
+ for %{"name" => name, "url" => %{"direct" => direct_url}} <- values do
+ "#{name}: #{direct_url}"
+ end
+
{:ok, items}
else
_ -> :error
end
end
-
end