A small shell script to grab audio from a CD and encode/compress it.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

70 lines
2.2 KiB

diff -Naur CDDB_get-2.23/CDDB_get.pm CDDB_get-2.23p1/CDDB_get.pm
--- CDDB_get-2.23/CDDB_get.pm 2003-09-07 15:49:27.000000000 +0000
+++ CDDB_get-2.23p1/CDDB_get.pm 2004-06-30 08:37:28.000000000 +0000
@@ -261,6 +261,7 @@
my $input = $config->{input};
my $multi = $config->{multi};
+ my $entry = $config->{entry} if (defined($config->{entry}));
$input = 0 if $multi;
print STDERR Dumper($config) if $debug;
@@ -426,7 +427,14 @@
}
}
} else {
- push @to_get,@list;
+ unless(defined($entry)) {
+ push @to_get,@list;
+ }
+ else {
+ if($entry-1 >= 0 && $entry-1 <= $#list) {
+ push @to_get,$list[$entry-1];
+ }
+ }
}
my $i=0;
diff -Naur CDDB_get-2.23/cddb.pl CDDB_get-2.23p1/cddb.pl
--- CDDB_get-2.23/cddb.pl 2003-08-16 19:01:49.000000000 +0000
+++ CDDB_get-2.23p1/cddb.pl 2004-06-30 08:33:03.000000000 +0000
@@ -27,12 +27,13 @@
use strict;
my %option = ();
-getopts("oghdtsiSfDlOFc:", \%option);
+getopts("oghdtsiSfDlOFe:c:", \%option);
if($option{h}) {
print "$0: gets CDDB info of a CD\n";
print " no argument - gets CDDB info of CD in your drive\n";
print " -c device (other than default device)\n";
+ print " -e which cddb-entry to use\n";
print " -o offline mode - just stores CD info\n";
print " -d output in xmcd format\n";
print " -s save in xmcd format\n";
@@ -81,11 +82,19 @@
$config{CD_DEVICE}=$option{c} if $option{c};
# user interaction welcome?
-
-$config{input}=1; # 1: ask user if more than one possibility
- # 0: no user interaction
-$config{multi}=0; # 1: do not ask user and get all of them
- # 0: just the first one
+if($option{e}) {
+ $config{entry}=$option{e};
+ $config{input}=0; # 1: ask user if more than one possibility
+ # 0: no user interaction
+ $config{multi}=0; # 1: do not ask user and get all of them
+ # 0: just the first one
+}
+else {
+ $config{input}=1; # 1: ask user if more than one possibility
+ # 0: no user interaction
+ $config{multi}=0; # 1: do not ask user and get all of them
+ # 0: just the first one
+}
my %db;