Fixed keyword bug and writing to md5 history file

This commit is contained in:
Anon 2024-04-30 15:58:24 -07:00
parent 78a7bb987a
commit 106682ac41

View File

@ -69,11 +69,11 @@ LENGTH="$(echo "$RESULT" | jq -r '. | .post | length')"
SELECTION=`seq 0 $LENGTH`
for i in $SELECTION;do
MD5="$(echo "$RESULT" | jq -r '. | .post['"$SELECTED"'].md5')"
MD5="$(echo "$RESULT" | jq -r '. | .post['"$SELECTION"'].md5')"
[ -z "$MD5" ] && continue
grep -q "$MD5" "$TMP" && continue
URL_FILE="$(echo "$RESULT" | jq -r '. | .post['"$SELECTED"'].file_url')"
RATING="$(echo "$RESULT" | jq -r '. | .post['"$SELECTED"'].rating')"
URL_FILE="$(echo "$RESULT" | jq -r '. | .post['"$SELECTION"'].file_url')"
RATING="$(echo "$RESULT" | jq -r '. | .post['"$SELECTION"'].rating')"
NSFW="--nsfw"
TEXT="$MSG_NSFW"
@ -98,6 +98,7 @@ for i in $SELECTION;do
continue
;;
esac
echo "$MD5" >> "$MD5_HISTORY"
"$ENTRY" "$DEFAULT_CREDENTIALS" "$DEFAULT_KEYFILE" "$NSFW" "$@" "$TEXT" "$PICKED"
exit 0
done