[Abcde-users] How to Contribute?
Chris Ruddy
chris.ruddy at gmail.com
Thu Mar 28 02:55:36 GMT 2024
Hi, I just started using abcde to rip my CD collection to flac and have been quite happy with it. I'd like to contribute improvements and bug fixes. How do I do that?
My first bug fix is to fix the bug in abcde-musicbrainz-tool that prevents it from working when the CD only has one track. The issue is an incorrect check:
if ($#discinfo < 5) {
print STDERR "Insufficient or missing discinfo data.\n";
exit(1);
}
"$#discinfo" is the index of the last element of @discinfo (i.e. 4)--not the length of @discinfo (i.e. 5). However, given GetOptions sets a minimum size of @discinfo to 5 ("discinfo=i{5,}"), the check above is redundant and should be removed:
diff --git a/abcde-musicbrainz-tool b/abcde-musicbrainz-tool
index 51e49c2..3ef400a 100755
--- a/abcde-musicbrainz-tool
+++ b/abcde-musicbrainz-tool
@@ -302,10 +302,6 @@ if ($command =~ m/^id/) {
# Calculate MusicBrainz ID from disc offsets; see
# https://musicbrainz.org/doc/DiscIDCalculation
- if ($#discinfo < 5) {
- print STDERR "Insufficient or missing discinfo data.\n";
- exit(1);
- }
my ($first, $last, $leadin, $leadout, @offsets) = @discinfo;
my $s = Digest::SHA->new(1);
-Chris
More information about the Abcde-users
mailing list