diff --git a/boorubot_v2.sh b/boorubot_v2.sh index 2bbee07..7ee97b4 100755 --- a/boorubot_v2.sh +++ b/boorubot_v2.sh @@ -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" @@ -95,7 +96,10 @@ 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