Merge branch 'main' into fix/pictures-dir-respect-locale

This commit is contained in:
ふらまりん
2025-07-19 09:28:26 +08:00
committed by GitHub
5 changed files with 20 additions and 14 deletions
@@ -29,7 +29,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
mkdir -p "$PICTURES_DIR/Wallpapers"
page=$((1 + RANDOM % 1000));
response=$(curl "https://konachan.com/post.json?tags=rating%3Asafe&limit=1&page=$page")
response=$(curl "https://konachan.net/post.json?tags=rating%3Asafe&limit=1&page=$page")
link=$(echo "$response" | jq '.[0].file_url' -r);
ext=$(echo "$link" | awk -F. '{print $NF}')
downloadPath="$PICTURES_DIR/Wallpapers/konachan_random_image.$ext"