Also give album name and spotify id to the helper script

This commit is contained in:
Lorenzo Pistone
2019-02-14 16:45:42 +01:00
parent ffd5b407e9
commit 348f885920
2 changed files with 12 additions and 6 deletions

13
tag_ogg
View File

@@ -2,12 +2,17 @@
set -e
fname=$(echo "${2} - ${1}.ogg" | tr '/' - | tr '\0' ' ')
fname=$(echo "${4} - ${2}.ogg" | tr '/' - | tr '\0' ' ')
cat > "$fname"
{
echo "TITLE=${1}" | tr '\n' ' '
shift
echo "SPOTIFY_ID=${1}"
title=$(tr '\n' ' ' <<< "${2}")
album=$(tr '\n' ' ' <<< "${3}")
echo "TITLE=${title}"
echo "ALBUM=${album}"
shift 3
for artist in "$@"; do
echo "ARTIST=${artist}" | tr '\n' ' '
artist=$(tr '\n' ' ' <<< "${artist}")
echo "ARTIST=${artist}"
done
} | vorbiscomment -a "$fname"