Check for errors in replaygain action.
authorJesus Climent <mooch@debian.org>
Tue, 30 Aug 2005 21:40:26 +0000 (21:40 +0000)
committerJesus Climent <mooch@debian.org>
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.

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";;