Added filter

This commit is contained in:
Anon 2025-01-05 22:51:58 -08:00
parent 278cc46fde
commit 10bf2ed85a

View File

@ -81,6 +81,7 @@ for i in $SELECTION;do
grep -q "$MD5" "$MD5_BLACKLIST" && continue
URL_FILE="$(echo "$RESULT" | jq -r '. | .post['"$i"'].file_url')"
RATING="$(echo "$RESULT" | jq -r '. | .post['"$i"'].rating')"
TAGS="$(echo "$RESULT" | jq -r '. | .post['"$i"'].tags')"
NSFW="--nsfw"
TEXT="$MSG_NSFW"
@ -96,6 +97,9 @@ for i in $SELECTION;do
[ "$RATING" = "general" ] && NSFW="--safe" && TEXT="$MSG_SFW"
[ "$RATING" = "sensitive" ] && NSFW="--safe" && TEXT="$MSG_SFW"
# No nsfw loli
[ "$NSFW" = "--nsfw" ] && echo "$TAGS" | grep -q "loli" > /dev/null && continue
[ ! -f "$PICKED" ] && echo "Failed to download: ${URL_FILE} to ${PICKED}" && continue
case "$(file --mime-type "$PICKED")" in