Update 'post.sh'

This commit is contained in:
NaiJi ✨ 2022-05-13 11:40:56 +00:00
parent 5494badd0e
commit b88ad5f8e6
1 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ then
exit 1 exit 1
fi fi
if [ 0 -eq $(ls ./music | wc -l) ]; if [ 0 -eq $(ls ./music | wc -l) ]
then then
mv posted_already/* music/ mv posted_already/* music/
fi fi
@ -57,7 +57,7 @@ media_music_id=$(jq -r ".id" <<< ${media_music_json})
echo $media_json echo $media_json
curl -X POST -d '{"status":"'"${full_title}"' by '"${full_artist}"' :mikulove: '"${link}"'", "visibility":"'unlisted'", "media_ids":'[\"${media_cover_id}\",\"${media_music_id}\"]'}' \ curl -X POST -d '{"status":"'"${full_title}"' by _ IT IS A TEST POST _ '"${full_artist}"' :mikulove: '"${link}"'", "visibility":"'unlisted'", "media_ids":'[\"${media_cover_id}\",\"${media_music_id}\"]'}' \
-H "Authorization: Bearer ${access_token}" \ -H "Authorization: Bearer ${access_token}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
"${api_base_url}/api/v1/statuses" "${api_base_url}/api/v1/statuses"
@ -66,4 +66,4 @@ rm -f temp.opus
rm -f cover.* rm -f cover.*
mkdir -p posted_already/ mkdir -p posted_already/
mv music/"$folder_name" posted_today/ mv music/"$folder_name" posted_already/