Deal with bizarre cdda2wav behaviour when doing cdtext lookup
authorSteve McIntyre <steve@einval.com>
Mon, 14 Jan 2019 23:52:35 +0000 (23:52 +0000)
committerSteve McIntyre <steve@einval.com>
Mon, 14 Jan 2019 23:52:35 +0000 (23:52 +0000)
It writes the track information to *stdin*. Closes Issue #89:
https://abcde.einval.com/bugzilla/show_bug.cgi?id=89

abcde
changelog

diff --git a/abcde b/abcde
index ae7bb79..9f6a184 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -2617,7 +2617,10 @@ do_cdtext_read ()
                # Do we have CD-Text on the disc (and can the drive read it?)
                (
                        cd "${SOURCE_WORKDIR}" && rm -f audio.* audio_*
-                       ${CDTEXT_READER} -J -v titles -D "${CDDA2WAVCDROM}" > "${SOURCE_WORKDIR}/cd-text" 2>&1
+                       # Even redirect fd 0 to our output file. It seems cdda2wav
+                       # writes to stdin too these days. Bizarre, buggy
+                       # behaviour! Should be harmless for icedax.
+                       ${CDTEXT_READER} -J -v titles -D "${CDDA2WAVCDROM}" > "${SOURCE_WORKDIR}/cd-text" 2>&1 0>&1
                )
                grep -a -q '^CD-Text: detected' "${SOURCE_WORKDIR}/cd-text"
                ERRORCODE=$?
index 3e28628..27adb5a 100644 (file)
--- a/changelog
+++ b/changelog
@@ -2,6 +2,9 @@ abcde 2.9.3-DEV
 
  * Replace non-portable sed code for generating offset list with some
    simple awk instead. Should now work on FreeBSD again.
+ * Deal with bizarre cdda2wav behaviour when doing cdtext lookup - it
+   writes the track information to *stdin*. Closes Issue #89:
+   https://abcde.einval.com/bugzilla/show_bug.cgi?id=89
 
 abcde 2.9.2