X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fhelpers%2Fmedia_helper.ex;h=738adfcaa9d446e71dafc5aa7ab2b169dbf934dd;hb=d7262f7d2232343e47c2206b134a7d794e35c505;hp=b6f35a24bb62109920358c4d1d6e99eb8ccf1771;hpb=7cdbd91d83c02a79c22783ca489ef82e82b31a51;p=akkoma
diff --git a/lib/pleroma/helpers/media_helper.ex b/lib/pleroma/helpers/media_helper.ex
index b6f35a24b..738adfcaa 100644
--- a/lib/pleroma/helpers/media_helper.ex
+++ b/lib/pleroma/helpers/media_helper.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Helpers.MediaHelper do
@@ -9,6 +9,18 @@ defmodule Pleroma.Helpers.MediaHelper do
alias Pleroma.HTTP
+ require Logger
+
+ def missing_dependencies do
+ Enum.reduce([imagemagick: "convert", ffmpeg: "ffmpeg"], [], fn {sym, executable}, acc ->
+ if Pleroma.Utils.command_available?(executable) do
+ acc
+ else
+ [sym | acc]
+ end
+ end)
+ end
+
def image_resize(url, options) do
with executable when is_binary(executable) <- System.find_executable("convert"),
{:ok, args} <- prepare_image_resize_args(options),