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"