Added filter
This commit is contained in:
parent
278cc46fde
commit
10bf2ed85a
@ -81,6 +81,7 @@ for i in $SELECTION;do
|
|||||||
grep -q "$MD5" "$MD5_BLACKLIST" && continue
|
grep -q "$MD5" "$MD5_BLACKLIST" && continue
|
||||||
URL_FILE="$(echo "$RESULT" | jq -r '. | .post['"$i"'].file_url')"
|
URL_FILE="$(echo "$RESULT" | jq -r '. | .post['"$i"'].file_url')"
|
||||||
RATING="$(echo "$RESULT" | jq -r '. | .post['"$i"'].rating')"
|
RATING="$(echo "$RESULT" | jq -r '. | .post['"$i"'].rating')"
|
||||||
|
TAGS="$(echo "$RESULT" | jq -r '. | .post['"$i"'].tags')"
|
||||||
|
|
||||||
NSFW="--nsfw"
|
NSFW="--nsfw"
|
||||||
TEXT="$MSG_NSFW"
|
TEXT="$MSG_NSFW"
|
||||||
@ -95,7 +96,10 @@ for i in $SELECTION;do
|
|||||||
|
|
||||||
[ "$RATING" = "general" ] && NSFW="--safe" && TEXT="$MSG_SFW"
|
[ "$RATING" = "general" ] && NSFW="--safe" && TEXT="$MSG_SFW"
|
||||||
[ "$RATING" = "sensitive" ] && 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
|
[ ! -f "$PICKED" ] && echo "Failed to download: ${URL_FILE} to ${PICKED}" && continue
|
||||||
|
|
||||||
case "$(file --mime-type "$PICKED")" in
|
case "$(file --mime-type "$PICKED")" in
|
||||||
|
Loading…
Reference in New Issue
Block a user