1
0
mirror of https://github.com/pisto/oggify synced 2024-11-14 17:27:29 +00:00

fix trailing whitespace in vorbis comments

This commit is contained in:
Lorenzo Pistone 2019-02-19 13:00:36 +01:00
parent 6d11933999
commit f7b0e2f17d

17
tag_ogg
View File

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