Removed Dedupe upload filter from instance generation wizard

The `Dedupe` filter is now always active, so there is no need to ask the
user to configure it anymore.
This commit is contained in:
itepechi 2024-04-15 04:34:38 +09:00
parent 0f0298abfd
commit 5adae54d52
Signed by: itepechi
GPG key ID: D948CE1B5ACD0B25

View file

@ -39,7 +39,6 @@ def run(["gen" | rest]) do
listen_port: :string, listen_port: :string,
strip_uploads: :string, strip_uploads: :string,
anonymize_uploads: :string, anonymize_uploads: :string,
dedupe_uploads: :string,
analyze_uploads: :string analyze_uploads: :string
], ],
aliases: [ aliases: [
@ -218,14 +217,6 @@ def run(["gen" | rest]) do
"n" "n"
) === "y" ) === "y"
dedupe_uploads =
get_option(
options,
:dedupe_uploads,
"Do you want to deduplicate uploaded files? (y/n)",
"n"
) === "y"
{analyze_uploads_message, analyze_uploads_default} = {analyze_uploads_message, analyze_uploads_default} =
if Enum.all?(["mogrify", "convert", "ffprobe"], fn x -> if Enum.all?(["mogrify", "convert", "ffprobe"], fn x ->
Pleroma.Utils.command_available?(x) Pleroma.Utils.command_available?(x)
@ -288,7 +279,6 @@ def run(["gen" | rest]) do
upload_filters(%{ upload_filters(%{
strip: strip_uploads, strip: strip_uploads,
anonymize: anonymize_uploads, anonymize: anonymize_uploads,
dedupe: dedupe_uploads,
analyze: analyze_uploads analyze: analyze_uploads
}) })
) )
@ -378,13 +368,6 @@ defp upload_filters(filters) when is_map(filters) do
enabled_filters enabled_filters
end end
enabled_filters =
if filters.dedupe do
enabled_filters ++ [Pleroma.Upload.Filter.Dedupe]
else
enabled_filters
end
enabled_filters = enabled_filters =
if filters.analyze do if filters.analyze do
enabled_filters ++ [Pleroma.Upload.Filter.AnalyzeMetadata] enabled_filters ++ [Pleroma.Upload.Filter.AnalyzeMetadata]