Skip to content

Instantly share code, notes, and snippets.

@Pmmlabs
Created May 10, 2020 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pmmlabs/d0f32ab463e1aafbffe7a161ce8d922b to your computer and use it in GitHub Desktop.
Save Pmmlabs/d0f32ab463e1aafbffe7a161ce8d922b to your computer and use it in GitHub Desktop.
LIST=$(curl https://www.last.fm/player/station/user/$USER/recommended?ajax=1 | jq -r '.playlist|.[]|._playlinks|.[0]|.url')
FILENAME="lastfm.pls"
echo "" > $FILENAME
i=1
for url in $LIST
do
echo "File$i=$url" >> $FILENAME
i=$((i+1))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment