2019-02-14 15:07:21 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2019-02-14 15:45:42 +00:00
|
|
|
fname=$(echo "${4} - ${2}.ogg" | tr '/' - | tr '\0' ' ')
|
2019-02-14 15:07:21 +00:00
|
|
|
cat > "$fname"
|
2019-02-18 08:56:19 +00:00
|
|
|
echo "$fname"
|
2019-02-14 15:07:21 +00:00
|
|
|
{
|
2019-02-14 15:45:42 +00:00
|
|
|
echo "SPOTIFY_ID=${1}"
|
|
|
|
title=$(tr '\n' ' ' <<< "${2}")
|
|
|
|
album=$(tr '\n' ' ' <<< "${3}")
|
|
|
|
echo "TITLE=${title}"
|
|
|
|
echo "ALBUM=${album}"
|
|
|
|
shift 3
|
2019-02-14 15:07:21 +00:00
|
|
|
for artist in "$@"; do
|
2019-02-14 15:45:42 +00:00
|
|
|
artist=$(tr '\n' ' ' <<< "${artist}")
|
|
|
|
echo "ARTIST=${artist}"
|
2019-02-14 15:07:21 +00:00
|
|
|
done
|
|
|
|
} | vorbiscomment -a "$fname"
|