URL passed to helper is already MediaProxy
Set :preview pool on the request
This commit is contained in:
parent
b529616e11
commit
f25b0e87f3
@ -12,8 +12,7 @@ defmodule Pleroma.Helpers.MediaHelper do
|
|||||||
def image_resize(url, options) do
|
def image_resize(url, options) do
|
||||||
with executable when is_binary(executable) <- System.find_executable("convert"),
|
with executable when is_binary(executable) <- System.find_executable("convert"),
|
||||||
{:ok, args} <- prepare_image_resize_args(options),
|
{:ok, args} <- prepare_image_resize_args(options),
|
||||||
url = Pleroma.Web.MediaProxy.url(url),
|
{:ok, env} <- Pleroma.HTTP.get(url, [], [adapter: [pool: :preview]]),
|
||||||
{:ok, env} <- Pleroma.HTTP.get(url),
|
|
||||||
{:ok, fifo_path} <- mkfifo() do
|
{:ok, fifo_path} <- mkfifo() do
|
||||||
args = List.flatten([fifo_path, args])
|
args = List.flatten([fifo_path, args])
|
||||||
run_fifo(fifo_path, env, executable, args)
|
run_fifo(fifo_path, env, executable, args)
|
||||||
@ -61,8 +60,7 @@ defmodule Pleroma.Helpers.MediaHelper do
|
|||||||
|
|
||||||
def video_framegrab(url) do
|
def video_framegrab(url) do
|
||||||
with executable when is_binary(executable) <- System.find_executable("ffmpeg"),
|
with executable when is_binary(executable) <- System.find_executable("ffmpeg"),
|
||||||
url = Pleroma.Web.MediaProxy.url(url),
|
{:ok, env} <- Pleroma.HTTP.get(url, [], [adapter: [pool: :preview]]),
|
||||||
{:ok, env} <- Pleroma.HTTP.get(url),
|
|
||||||
{:ok, fifo_path} <- mkfifo(),
|
{:ok, fifo_path} <- mkfifo(),
|
||||||
args = [
|
args = [
|
||||||
"-y",
|
"-y",
|
||||||
|
Loading…
Reference in New Issue
Block a user