import the cuefile in the flac onetrack output
authordata <data@a0fa61bc-5347-0410-a1a9-7f54aa4e1825>
Sun, 15 Jan 2006 17:25:56 +0000 (17:25 +0000)
committerdata <data@a0fa61bc-5347-0410-a1a9-7f54aa4e1825>
Sun, 15 Jan 2006 17:25:56 +0000 (17:25 +0000)
git-svn-id: http://abcde.googlecode.com/svn/trunk@181 a0fa61bc-5347-0410-a1a9-7f54aa4e1825

TODO
abcde
cddb-tool

diff --git a/TODO b/TODO
index 8a5d486..d3ac97d 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,8 +1,9 @@
 TODO:
 ----
 * flac with force.
-* Get the echo instances to behave consistently
 
+* Get the multiple choices in both local and remote CDDB to use the same
+  functions.
 
 * Add musicbrainz support: http://www.rupamsunyata.org/~decklin/musicbrainz-get-tracks
 
diff --git a/abcde b/abcde
index b0a0e5c..2798902 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -906,7 +906,7 @@ do_encode ()
                                case "$2" in
                                %local*%)
                                        case "$FLACENCODERSYNTAX" in
-                                       flac) $RUN_COMMAND nice $ENCNICE $FLACENCODER -f $FLACENCODEROPTS -o "$OUT" "$IN" ;; 
+                                       flac) $RUN_COMMAND nice $ENCNICE $FLACENCODER -f ${IMPORTCUESHEET:+--cuesheet="$ABCDETEMPDIR/$CUEFILE"} $FLACENCODEROPTS -o "$OUT" "$IN" ;; 
                                        esac
                                                ;;
                                        *)
@@ -3021,6 +3021,9 @@ do
                        [ "$FLACENCODERSYNTAX" = "default" ] && FLACENCODERSYNTAX=flac
                        [ "$DOTAG" = "y" ] && NEEDMETAFLAC=y
                        [ "$DOREPLAYGAIN" = "y" ] && NEEDMETAFLAC=y
+                       if [ "$ONETRACK" = "y" ]; then
+                               [ "$MAKECUEFILE" = "y" ] && IMPORTCUESHEET=y
+                       fi
                        ;;
                spx)
                        [ "$SPEEXENCODERSYNTAX" = "default" ] && SPEEXENCODERSYNTAX=speexenc
@@ -3373,6 +3376,10 @@ if [ "$LOWDISK" = "y" ] || [ "$ONETRACK" = "y" ]; then
 fi
 
 if [ "$ONETRACK" = "y" ]; then 
+       # Reuse the CUEFILE in case we created it in a previous run
+       if CUEFILE=$(checkstatus cuefile) >/dev/null ; then
+               IMPORTCUESHEET=y
+       fi
        TRACKS="$FIRSTTRACK"
        if checkstatus readtrack-$FIRSTTRACK; then :; else
                if [ "$USEPIPES" = "y" ]; then
index f5bf6b5..4f44a89 100755 (executable)
--- a/cddb-tool
+++ b/cddb-tool
@@ -21,7 +21,7 @@
 #  - Submitted via: line is created by template, when it really should be in send.
 #    Oh well.
 
-VERSION=0.4.6
+VERSION=0.4.7
 NAME=cddb-tool
 
 #return codes
@@ -209,7 +209,7 @@ query) # cddb-tool query serverurl proto user host discid...
        TRACKINFO="$@"
        TRACKINFOPLUS=$(echo $TRACKINFO | tr ' ' '+')
        RESULTS=$($HTTPGET "$SERVER?cmd=cddb+query+$TRACKINFOPLUS\&hello=$HELLOINFO\&proto=$PROTO") || exit $LOOKUP_ERR
-       echo $RESULTS | tr '\r' '\n' | tr -s '\n' | sed 's/^ //g'
+       echo "$RESULTS" | tr '\r' '\n' | tr -s '\n' | sed 's/^ //g'
        ;;
 
 read) # cddb-tool read serverurl proto user host genre discnumber