Rename the new module
This commit is contained in:
parent
cd316d7269
commit
551721e41a
9 changed files with 23 additions and 23 deletions
|
|
@ -35,7 +35,7 @@ defmodule Mix.Tasks.Pleroma.Instance do
|
|||
listen_ip: :string,
|
||||
listen_port: :string,
|
||||
strip_uploads: :string,
|
||||
read_uploads_data: :string,
|
||||
read_uploads_description: :string,
|
||||
anonymize_uploads: :string,
|
||||
dedupe_uploads: :string
|
||||
],
|
||||
|
|
@ -179,7 +179,7 @@ defmodule Mix.Tasks.Pleroma.Instance do
|
|||
strip_uploads_default
|
||||
) === "y"
|
||||
|
||||
{read_uploads_data_message, read_uploads_data_default} =
|
||||
{read_uploads_description_message, read_uploads_description_default} =
|
||||
if Pleroma.Utils.command_available?("exiftool") do
|
||||
{"Do you want to read data from uploaded files so clients can use it to prefill fields like image description? This requires exiftool, it was detected as installed. (y/n)",
|
||||
"y"}
|
||||
|
|
@ -188,12 +188,12 @@ defmodule Mix.Tasks.Pleroma.Instance do
|
|||
"n"}
|
||||
end
|
||||
|
||||
read_uploads_data =
|
||||
read_uploads_description =
|
||||
get_option(
|
||||
options,
|
||||
:read_uploads_data,
|
||||
read_uploads_data_message,
|
||||
read_uploads_data_default
|
||||
:read_uploads_description,
|
||||
read_uploads_description_message,
|
||||
read_uploads_description_default
|
||||
) === "y"
|
||||
|
||||
anonymize_uploads =
|
||||
|
|
@ -248,7 +248,7 @@ defmodule Mix.Tasks.Pleroma.Instance do
|
|||
upload_filters:
|
||||
upload_filters(%{
|
||||
strip: strip_uploads,
|
||||
read_data: read_uploads_data,
|
||||
read_description: read_uploads_description,
|
||||
anonymize: anonymize_uploads,
|
||||
dedupe: dedupe_uploads
|
||||
})
|
||||
|
|
@ -323,8 +323,8 @@ defmodule Mix.Tasks.Pleroma.Instance do
|
|||
end
|
||||
|
||||
enabled_filters =
|
||||
if filters.read_data do
|
||||
enabled_filters ++ [Pleroma.Upload.Filter.ExiftoolReadData]
|
||||
if filters.read_description do
|
||||
enabled_filters ++ [Pleroma.Upload.Filter.Exiftool.ReadDescription]
|
||||
else
|
||||
enabled_filters
|
||||
end
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ defmodule Pleroma.ApplicationRequirements do
|
|||
defp check_system_commands!(:ok) do
|
||||
filter_commands_statuses = [
|
||||
check_filter(Pleroma.Upload.Filter.Exiftool, "exiftool"),
|
||||
check_filter(Pleroma.Upload.Filter.ExiftoolReadData, "exiftool"),
|
||||
check_filter(Pleroma.Upload.Filter.Exiftool.ReadDescription, "exiftool"),
|
||||
check_filter(Pleroma.Upload.Filter.Mogrify, "mogrify"),
|
||||
check_filter(Pleroma.Upload.Filter.Mogrifun, "mogrify"),
|
||||
check_filter(Pleroma.Upload.Filter.AnalyzeMetadata, "mogrify"),
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Pleroma.Upload.Filter.ExiftoolReadData do
|
||||
defmodule Pleroma.Upload.Filter.Exiftool.ReadDescription do
|
||||
@moduledoc """
|
||||
Gets the description from the related EXIF tags and provides them in the response if no description is provided yet.
|
||||
It will first check ImageDescription, when that's too long or empty, it will check iptc:Caption-Abstract.
|
||||
Loading…
Add table
Add a link
Reference in a new issue