Menu

#1 bug in Net:CDDB

open
5
2001-10-15
2001-10-15
Paul Zirnik
No

hi thommy,

there was a problem in Net:CDDB

it failed to handle Titles with more than one line
output from CDDB.

sorry i cant make a patch file, but here is the fix
for CDDB.pm

simply replace the complete function in CDDB.pm

----------
sub _extract_stuff {
my @lines = @_;
my @returns;
my $line;
my $art_title;
my $track_nr = 0;
my $track_title;

foreach $line (@lines) {
if ($line =~ /^DTITLE/) {
$line =~ /.*?=(.*)$/o;
$art_title .= $1;
} elsif ($line =~ /^TTITLE/) {
if ($art_title) {
my ($a,$t) = _artist_title($art_title);
push @returns, $a;
push @returns, $t;
print "TITLE: $art_title\n" if $debug;
undef $art_title;
}
$line =~ /TTITLE(.*)=.*$/o;
print "$1\n";
if ($1 == $track_nr) {
$track_nr = $1;
$line =~ /.*=(.*)$/o;
$track_title .= $1;
} else {
push @returns, $track_title;
print "TRACK_TITLE: $track_title\n" if
$debug;
$line =~ /.*?=(.*)$/o;
$track_title = $1 ;
$line =~ /TTITLE(.*)=.*$/o;
$track_nr = $1;
}
}
}
push @returns, $track_title;
print "TRACK_TITLE: $track_title\n" if $debug;
return @returns;
}
--------------------

i also mailed the patch to Net:CDDB maintainer

greets,
Tami

Discussion

  • Paul Zirnik

    Paul Zirnik - 2001-10-23

    fix for CDDB.pm

     
  • Paul Zirnik

    Paul Zirnik - 2001-10-23

    Logged In: YES
    user_id=240880

    found some time to make a diff :)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.