From df0eab2e22bbe93a0b0ec939af69ee7a1afa8875 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Fri, 13 Oct 2023 13:43:05 +0530 Subject: [PATCH] use api key to fetch image meta --- packages/scripts/wallhaven.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/scripts/wallhaven.sh b/packages/scripts/wallhaven.sh index 4f44af1..c915f20 100755 --- a/packages/scripts/wallhaven.sh +++ b/packages/scripts/wallhaven.sh @@ -33,7 +33,7 @@ fi notify-send -r 9897 -i information -t 1000 "Wallpapers" "Downloading..." URL="https://wallhaven.cc/api/v1/search?${WALLHAVEN_API_KEY}${TAGS}${CATEGORIES}${PURITY}atleast=3840x2160&ratios=16x9&sorting=random" ID="$(curl --silent "$URL" | jq -r '.data[0].id')" -IMAGE_META=$(curl --silent "https://wallhaven.cc/api/v1/w/$ID") +IMAGE_META=$(curl --silent "https://wallhaven.cc/api/v1/w/$ID?${WALLHAVEN_API_KEY}") IMAGE_URL="$(echo "$IMAGE_META" | jq -r '.data.path')" IMAGE_ID="$(echo "$IMAGE_META" | jq -r '.data.id')" FILENAME="wallhaven-$IMAGE_ID"