-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Package: abcde
Version: 2.3.99.6-1
While ripping my CD collection to ONETRACK flac files and individual ogg
files, I ran into a problem with the option parsing code. I'm using the
- -t 0 option when ripping flac files and putting them in the same
directory as the ogg files, yielding something like the following:
00.AlbumTitle.flac
01.Track1.ogg
02.Track2.ogg
...
However, for multi-disc sets, the -W switch is "hard-coding" the start
track number, so I get:
101.AlbumTitle.flac
101.Track1.ogg
102.Track2.ogg
...
201.AlbumTitle.flac
201.Track1.ogg
202.Track2.ogg
instead of:
100.AlbumTitle.flac
101.Track1.ogg
102.Track2.ogg
...
200.AlbumTitle.flac
201.Track1.ogg
202.Track2.ogg
The attached patch fixes the problem by using the existing
STARTTRACKNUMBER (if set) in the -W option processing.
This requires any -t or -T option to be present on the command line
*BEFORE* the -W switch, and isn't totally fool-proof (no test for
maximum pad length required, and it would be a BadIdea to pass multiple
- -W switches!), but it does what I need.
Simple patch attached.
- --
Charles Steinkuehler
[EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
iD8DBQFFJWqWenk4xp+mH40RAqLgAKC8mOvNy5lgA4MH5U4fr3KpGxTgBwCfXA/L
2abAUYItTrRMlZFd26fdCGE=
=raIN
-----END PGP SIGNATURE-----
--- abcde.svn.freedb2 2006-10-04 16:44:57.457570805 -0500
+++ abcde.svn.concatenate 2006-10-05 15:20:32.214134344 -0500
@@ -3212,7 +3212,7 @@
X) CUE2DISCID="$OPTARG" ;;
w) COMMENT="$OPTARG" ;;
W) if echo $OPTARG | grep "[[:digit:]]" > /dev/null 2>&1 ; then
- STARTTRACKNUMBER="${OPTARG}01" ; STARTTRACKNUMBERTAG="y" ; COMMENT="CD${OPTARG}"
+ STARTTRACKNUMBER="${OPTARG}$(printf %02d ${STARTTRACKNUMBER:-01})" ; STARTTRACKNUMBERTAG="y" ; COMMENT="CD${OPTARG}"
else
log error "argument of -W must be integer"
exit 1