[Abcde-users] [PATCH] Adjust leadout when reading cuesheet

Jason Miller aidenn0 at geocities.com
Wed Jul 7 04:48:19 BST 2021


The Musicbrainz lookup code adds the pregap to the leadout, so to get
proper results when looking up embedded flac cuesheets generated with
--wholedisk we need to subtract the pregap from the leadout.

With this change I tried 3 different disks that failed to do the MB
lookup with an embedded FLAC cuesheet, and they all worked.  To generate
the proper embedded cusheet the following options were used:

    MKCUE=abcde.mkcue
    MKCUEOPTS=--wholedisk
    CUEREADERSYNTAX=abcde.mkcue
---
 abcde | 1 +
 1 file changed, 1 insertion(+)

diff --git a/abcde b/abcde
index b53593a..76266f9 100755
--- a/abcde
+++ b/abcde
@@ -2088,6 +2088,7 @@ do_discid ()
 
 							LEADOUT=$(( $(echo "$CUESHEET" | grep lead-out | get_last) * 75 / 44100 ))
 							LEADIN=$(( $(echo "$CUESHEET" | grep lead-in | get_last) * 75 / 44100 ))
+							LEADOUT=$((LEADOUT - $(set - $OFFSETS; echo $1)))
 							makeids
 						;;
 						*)
-- 
2.29.3




More information about the Abcde-users mailing list