implement MP3 encoding

This commit is contained in:
Vincent Riquer 2013-03-14 14:11:57 +01:00
parent 3e1b6bc1c0
commit a59a9915ce

26
atom
View File

@ -1068,14 +1068,24 @@ getDestFile() {
fi fi
} }
transcodeFile() { encodeFile::mp3() {
#sox -> wav lameopts="--quiet -v --abr ${destinationquality[$destination]}"
for format in $targets["format"] [ -n "$album" ] && lameopts+=" --tl \"$album\""
do [ -n "$artist" ] && lameopts+=" --ta \"$artist\""
#encodeFile::$format [ -n "$genre" ] && lameopts+=" --tg \"$genre\""
: [ -n "$title" ] && lameopts+=" --tt \"$title\""
done [ -n "$track" ] && lameopts+=" --tn \"$track\""
#signal and of encoding to parent [ -n "$year" ] && lameopts+=" --ty \"$year\""
encodetaskid=$(
Insert tasks <<-EOInsert
key ${fileid}lame$destination
requires ${soxtaskid:-$decodetaskid}
command_line lame $lameopts "$tempdir/$tmpfile.wav" "$destdir/$destfile.mp3"
source_file $fileid
status 0
EOInsert
)
progressSpin
} }
checkFinished() { checkFinished() {