handle multiple albums

This commit is contained in:
λmolinae 2025-05-03 22:38:18 -06:00
parent 9e5d3c9bcf
commit 6b7a348c3b

View file

@ -32,8 +32,7 @@ if [ -z "$data" ]; then
exit 0 exit 0
fi fi
albumtitle="$(echo "$data" | sed -n '1p')" echo "$data" | paste -d '\t' - - - | while IFS=$'\t' read -r albumtitle albumurl albumcover; do
albumurl="$(echo "$data" | sed -n '2p')" payload=$(generate_post_data "$albumtitle" "$albumurl" "$albumcover")
albumcover="$(echo "$data" | sed -n '3p')" curl -H "Content-Type: application/json" -X POST -d "$payload" "$discord_url"
done
curl -H "Content-Type: application/json" -X POST -d "$(generate_post_data)" $discord_url