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.27/CDDB_get.pm CDDB_get-2.27.patched/CDDB_get.pm
--- CDDB_get-2.27/CDDB_get.pm 2006-01-01 20:52:54.000000000 +0100
+++ CDDB_get-2.27.patched/CDDB_get.pm 2006-05-27 09:54:30.733131044 +0200
@@ -262,6 +262,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;
@@ -441,7 +442,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.27/cddb.pl CDDB_get-2.27.patched/cddb.pl
--- CDDB_get-2.27/cddb.pl 2005-10-06 08:00:59.000000000 +0200
+++ CDDB_get-2.27.patched/cddb.pl 2006-05-27 09:56:17.798156565 +0200
@@ -27,12 +27,13 @@
use strict;
my %option = ();
-getopts("oghdtsi:SfDlOFc:H:CIRGP", \%option);
+getopts("oghdtsi:SfDlOFe:c:H:CIRGP", \%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";
@@ -110,11 +111,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
+}
$config{input}=0 if($option{I});