use api key to fetch image meta
This commit is contained in:
parent
51ef0a6c74
commit
df0eab2e22
1 changed files with 1 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue