2019-02-19 12:00:36 +00:00
|
|
|
#!/bin/bash
|
2019-02-14 15:07:21 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2019-02-19 12:00:36 +00:00
|
|
|
fname="${4} - ${2}.ogg"
|
|
|
|
fname="${fname//\//-}"
|
|
|
|
cat > "${fname}"
|
2019-02-14 15:07:21 +00:00
|
|
|
{
|
2019-02-14 15:45:42 +00:00
|
|
|
echo "SPOTIFY_ID=${1}"
|
2019-02-19 12:05:38 +00:00
|
|
|
echo "TITLE=${2//'\n'/' '}"
|
|
|
|
echo "ALBUM=${3//'\n'/' '}"
|
2019-02-14 15:45:42 +00:00
|
|
|
shift 3
|
2019-02-14 15:07:21 +00:00
|
|
|
for artist in "$@"; do
|
2019-02-19 12:05:38 +00:00
|
|
|
echo "ARTIST=${artist//'\n'/' '}"
|
2019-02-14 15:07:21 +00:00
|
|
|
done
|
2019-02-19 12:00:36 +00:00
|
|
|
} | vorbiscomment -a "${fname}"
|
2019-02-19 12:03:50 +00:00
|
|
|
echo "${fname}"
|