generated from nhcarrigan/template
This commit is contained in:
2
songs.sh
2
songs.sh
@ -29,8 +29,6 @@ for file in $(find /home/naomi/music -type f -print0 | tr '\0' '\n'); do
|
||||
|
||||
# use jq to add the song to the list
|
||||
songs="$songs$(jq -n --arg title "$title" --arg artist "$artist" '{title: $title, artist: $artist}'),"
|
||||
|
||||
# songs="$songs{\"title\":\"$(echo "$title" | sed -e 's/[\\"\/]/\\&/g' | sed -e 's/[\x01-\x1f\x7f]//g')\",\"artist\":\"$(echo "$artist" | sed -e 's/[\\"\/]/\\&/g' | sed -e 's/[\x01-\x1f\x7f]//g')\"},"
|
||||
done
|
||||
|
||||
# Remove trailing comma and add square brackets to complete the list
|
||||
|
Reference in New Issue
Block a user