Check for errors in replaygain action.
authordata <data@a0fa61bc-5347-0410-a1a9-7f54aa4e1825>
Tue, 30 Aug 2005 21:40:26 +0000 (21:40 +0000)
committerdata <data@a0fa61bc-5347-0410-a1a9-7f54aa4e1825>
Tue, 30 Aug 2005 21:40:26 +0000 (21:40 +0000)
Renamed vorbisgain action to replaygain.
Added a check for the case when normalize and replaygain are both requested.

git-svn-id: http://abcde.googlecode.com/svn/trunk@118 a0fa61bc-5347-0410-a1a9-7f54aa4e1825

abcde

diff --git a/abcde b/abcde
index 0b78836..9a5742f 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -347,9 +347,17 @@ do_replaygain()
                                ogg);;
                                *);;
                        esac
-                       echo vorbisgain-$OUTPUT >> "$ABCDETEMPDIR/status"
+                       if [ "$RETURN" = "0" ]; then
+                               run_command replaygain-$OUTPUT true
+                       else
+                               runcommand replaygain-$OUTPUT false
+                       fi
                done
-               echo vorbisgain >> "$ABCDETEMPDIR/status"
+               if checkerrors replaygain-.{3,4}; then
+                       run_command replaygain false
+               else
+                       run_command replaygain true
+               fi
        fi
 }
 
@@ -2527,6 +2535,11 @@ do
        esac
 done
 
+if [ "$DONORMALIZE" = "y" ] && [ "$DOREPLAYGAIN" = "y" ]; then
+       # FIXME # should we abort on error or just inform the user?
+       :
+fi
+
 for SHOWCDDBFIELD in $(echo $SHOWCDDBFIELDS | tr , \ ); do
        case $SHOWCDDBFIELD in
                y*|Y*) SHOWCDDBYEAR="y";;