From 3833a1cdf1097f4dc95adac7a39d98337eb2250a Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Sat, 9 Mar 2013 02:19:31 +0100 Subject: [PATCH] add normalize option --- atom | 17 +++++++++++++++++ doc/config | 1 + doc/example.cfg | 3 +++ 3 files changed, 21 insertions(+) diff --git a/atom b/atom index 18bee0d..a8f4ada 100755 --- a/atom +++ b/atom @@ -18,6 +18,7 @@ declare -A \ destinationformat \ destinationfrequency \ destinationid \ + destinationnormalize \ destinationpath \ destinationquality \ destinationrename \ @@ -159,6 +160,21 @@ getConfigDestination() { ;; esac ;; + 'normalize') + case $value in + 'true|on|yes') + destinationnormalize["$destination"]=1 + ;; + 'false|off|no') + destinationnormalize["$destination"]=0 + ;; + *) + echo "normalize takes values:" \ + "'yes' ,'true' ,'on', 'no', 'false',"\ + "'off'" + ;; + esac + ;; 'bitrate') expr='^[0-9]*$' if ! [[ $value =~ $expr ]] @@ -972,6 +988,7 @@ cat </: Normalize output files. * rename : Destination files will be named according to , after expansion of special strings: %{album}, diff --git a/doc/example.cfg b/doc/example.cfg index 9a116e7..7f7ebce 100644 --- a/doc/example.cfg +++ b/doc/example.cfg @@ -15,6 +15,7 @@ skip /zzz-atrier path /mnt/Musique-OggQ2 format vorbis quality 1 +normalize yes channels 2 frequency 44100 @@ -27,6 +28,7 @@ copy_mime-type text/* path /mnt/Musique-mp3.test format mp3 bitrate 96 +normalize yes # rename file, path unchanged rename %{track}--%{artist}-%{title} @@ -38,6 +40,7 @@ skip_mime-type text/* [asterisk] path /mnt/Musique-asterisk format vorbis +normalize yes channels 1 frequency 8000 skip_mime-type image/*