Created
June 1, 2016 18:54
-
-
Save snipem/bdbfb45d10245e0de3846f82dc2692b3 to your computer and use it in GitHub Desktop.
Lists all your Deezer playlists, put's them to a file for you to edit, deletes all the playlists listed in that file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
access_token="ENTER_YOUR_DEEZER_ACCESS_CODE_HERE" | |
nr_to_fetch="1000" | |
#curl https://api.deezer.com/user/me?access_token=$access_token | |
curl "http://api.deezer.com/user/me/playlists?access_token=$access_token&limit=$nr_to_fetch&index=0" | jq '.data[] | "\(.title),\(.nb_tracks),\(.id)"' > all_playlists.txt | |
# NOW Edit all_playlists.txt and copy it to all_playlists_edited.txt | |
cat all_playlists_edited.txt | awk -F, '{print $3}'| sed "s/\"//g" | | |
while read line ; do | |
echo Deleting $line | |
curl -X "DELETE" http://api.deezer.com/playlist/$line?access_token=$access_token | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment