diff --git a/lib/decode/decodeFile b/lib/decode/decodeFile index cc52f01..09c2dc3 100644 --- a/lib/decode/decodeFile +++ b/lib/decode/decodeFile @@ -3,7 +3,17 @@ decodeFile() { case "$mimetype" in 'video/'*) extractAudio - sox_needed=1 + if (( ${destinationnormalize["$destination"]}))\ + || ( + [ -n "${destinationfrequency["$destination"]}" ]\ + && (( ${rate:-0} != ${destinationfrequency["$destination"]}))\ + ) || ( + [ -n "${destinationchannels["$destination"]}" ]\ + && (( ${channels:-0} != ${destinationchannels["$destination"]} )) + ) + then + sox_needed=1 + fi ;; 'audio/mpeg') if [[ ${destinationformat[$destination]} = mp3 ]] \