Browse Source

scheint jetzt wirklich gut zu funktionieren...zumindest mit flac. Hab nahezu alle meine CDs damit encoded. Was anderes als flac hab ich noch nicht getestet.

master
Georg Hopp 18 years ago
parent
commit
272e295b74
  1. 28
      getcd.sh
  2. 2
      shellUtils.sh

28
getcd.sh

@ -412,7 +412,7 @@ do
case ${encodingType} in
f)
outFile="`printf %02d ${trackNr}`-${tTitle[$i]}.flac"
outStr="track-$trackNr => ${outFile}: "
outStr="track-$trackNr => ${outFile/\//-}: "
(
exec 2>&1
@ -422,14 +422,14 @@ do
-T genre="${dGenre}" -T title="${tTitle[$i]}" \
-T tracknumber="${trackNr}" -T tracknum="${trackNr}" \
-T date="${dYear}" -T comment="" \
-o "${encodingDir}/${outFile}" - #2>/dev/null
-o "${encodingDir}/${outFile/\//-}" - #2>/dev/null
) | tr '\r' '\n' |\
sed '/^ [0-9]/!d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\
sed '/^ [0-9]/!d;/^ *[0-9]*\./d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\
tr -d '\n' >$outStream
;;
m)
outFile="`printf %02d ${trackNr}`-${tTitle[$i]}.mp3"
outStr="track-$trackNr => ${outFile}: "
outStr="track-$trackNr => ${outFile/\//-}: "
case ${encoder} in
lame)
@ -441,9 +441,9 @@ do
--tg "${dGenre}" --tt "${tTitle[$i]}" \
--tn "${trackNr}" --ty "${dYear}" \
--tc "" \
- "${encodingDir}/${outFile}" 2>/dev/null
- "${encodingDir}/${outFile/\//-}" 2>/dev/null
) | tr '\r' '\n' |\
sed '/^ [0-9]/!d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\
sed '/^ [0-9]/!d;/^ *[0-9]*\./d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\
tr -d '\n' >$outStream
;;
bladeenc)
@ -451,16 +451,16 @@ do
exec 2>&1
cdda2wav -H -D/dev/cdrom -I${cddaIf} -t${trackNr} - |\
bladeenc -progress=0 STDIN \
"${encodingDir}/${outFile}" 2>/dev/null
"${encodingDir}/${outFile/\//-}" 2>/dev/null
) | tr '\r' '\n' |\
sed '/^ [0-9]/!d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\
sed '/^ [0-9]/!d;/^ *[0-9]*\./d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\
tr -d '\n' >$outStream
;;
esac
;;
o)
outFile="`printf %02d ${trackNr}`-${tTitle[$i]}.ogg"
outStr="track-$trackNr => ${outFile}: "
outStr="track-$trackNr => ${outFile/\//-}: "
(
exec 2>&1
@ -469,21 +469,21 @@ do
-G "${dGenre}" -t "${tTitle[$i]}" \
-N "${trackNr}" -d "${dYear}" \
-c "" \
-o "${encodingDir}/${outFile}" - 2>/dev/null
-o "${encodingDir}/${outFile/\//-}" - 2>/dev/null
) | tr '\r' '\n' |\
sed '/^ [0-9]/!d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\
sed '/^ [0-9]/!d;/^ *[0-9]*\./d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\
tr -d '\n' >$outStream
;;
w)
outFile="`printf %02d ${trackNr}`-${tTitle[$i]}.wav"
outStr="track-$trackNr => ${outFile}: "
outStr="track-$trackNr => ${outFile/\//-}: "
(
exec 2>&1
cdda2wav -H -D/dev/cdrom -I${cddaIf} -t${trackNr} - >\
"${encodingDir}/${outFile}"
"${encodingDir}/${outFile/\//-}"
) | tr '\r' '\n' |\
sed '/^ [0-9]/!d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\
sed '/^ [0-9]/!d;/^ *[0-9]*\./d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\
tr -d '\n' >$outStream
;;
esac

2
shellUtils.sh

@ -464,7 +464,7 @@ function getCDInfo
if [ "x$delimiter" != "x" ]
then
eval "`echo "$cddb" | tr -d '\r' | sed '
/TTITLE/s/^TTITLE\([0-9]*\)=\(\(.*\)'"$delimiter"'\)*\(.*\)$/tArtist[\1]="\3";tTitle[\1]="\4"/p
/TTITLE/s/^TTITLE\([0-9]*\)=\(\(.*\)'"${delimiter/\//\\/}"'\)*\(.*\)$/tArtist[\1]="\3";tTitle[\1]="\4"/p
d'`"
fi
fi

Loading…
Cancel
Save