handle multiple albums
This commit is contained in:
parent
9e5d3c9bcf
commit
6b7a348c3b
1 changed files with 4 additions and 5 deletions
9
webhook
9
webhook
|
@ -32,8 +32,7 @@ if [ -z "$data" ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
albumtitle="$(echo "$data" | sed -n '1p')"
|
||||
albumurl="$(echo "$data" | sed -n '2p')"
|
||||
albumcover="$(echo "$data" | sed -n '3p')"
|
||||
|
||||
curl -H "Content-Type: application/json" -X POST -d "$(generate_post_data)" $discord_url
|
||||
echo "$data" | paste -d '\t' - - - | while IFS=$'\t' read -r albumtitle albumurl albumcover; do
|
||||
payload=$(generate_post_data "$albumtitle" "$albumurl" "$albumcover")
|
||||
curl -H "Content-Type: application/json" -X POST -d "$payload" "$discord_url"
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue