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