diff --git a/atom b/atom index da7258c..558df16 100755 --- a/atom +++ b/atom @@ -1068,14 +1068,24 @@ getDestFile() { fi } -transcodeFile() { - #sox -> wav - for format in $targets["format"] - do - #encodeFile::$format - : - done - #signal and of encoding to parent +encodeFile::mp3() { + lameopts="--quiet -v --abr ${destinationquality[$destination]}" + [ -n "$album" ] && lameopts+=" --tl \"$album\"" + [ -n "$artist" ] && lameopts+=" --ta \"$artist\"" + [ -n "$genre" ] && lameopts+=" --tg \"$genre\"" + [ -n "$title" ] && lameopts+=" --tt \"$title\"" + [ -n "$track" ] && lameopts+=" --tn \"$track\"" + [ -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() {