54 lines
1.6 KiB
Plaintext
54 lines
1.6 KiB
Plaintext
$OpenBSD: patch-vlorb,v 1.3 2003/05/23 20:07:47 naddy Exp $
|
|
--- vlorb.orig Fri May 23 18:29:43 2003
|
|
+++ vlorb Fri May 23 18:30:05 2003
|
|
@@ -1,4 +1,4 @@
|
|
-#!/usr/bin/env perl
|
|
+#!/usr/bin/perl
|
|
#
|
|
# vlorb, a CD to Ogg Vorbis ripper.
|
|
# Copyright (c) 2002, Jochem Kossen <j.kossen@home.nl>
|
|
@@ -36,7 +36,7 @@ use warnings;
|
|
my %config;
|
|
|
|
# Path to device name of CD-ROM to use.
|
|
-$config{device} = '/dev/cdrom';
|
|
+$config{device} = '/dev/cd0c';
|
|
|
|
# 1 = Use bitrate mode, 0 = use quality mode for ogg encoding.
|
|
$config{use_bitrate} = 0;
|
|
@@ -312,7 +312,7 @@ sub mk_album_directory() {
|
|
my ($artist, $disctitle, $mask) = @_;
|
|
my $albumdir;
|
|
|
|
- if ($global{singleartist}) {
|
|
+ if (($global{singleartist}) && ($disctitle ne $config{unknown})) {
|
|
my @dname = split(//, $mask);
|
|
for (@dname) {
|
|
($_ ne 'A' && $_ ne 'D') && do { &error('error in dirmask: ' . $mask) };
|
|
@@ -332,7 +332,7 @@ sub mk_album_directory() {
|
|
$dirname = $dirname . $config{filemask_seperator} . $dname[$i] if ($dname[$i]);
|
|
$i++;
|
|
}
|
|
- $albumdir = $dirname;
|
|
+ $albumdir = $dirname;
|
|
} else {
|
|
$albumdir = $disctitle;
|
|
}
|
|
@@ -733,11 +733,11 @@ sub vlorb() {
|
|
&msg("\n") if $config{show_progress};
|
|
|
|
# escape double quotes in strings
|
|
- $tracktitle =~ s/"/\\"/g;
|
|
- $disctitle =~ s/"/\\"/g;
|
|
- $artist =~ s/"/\\"/g;
|
|
- $genre =~ s/"/\\"/g;
|
|
- $filename =~ s/"/\\"/g;
|
|
+ $tracktitle =~ s/"/\\"/g if ($tracktitle);
|
|
+ $disctitle =~ s/"/\\"/g if ($disctitle);
|
|
+ $artist =~ s/"/\\"/g if ($artist);
|
|
+ $genre =~ s/"/\\"/g if ($genre);
|
|
+ $filename =~ s/"/\\"/g if ($filename);
|
|
|
|
my $bq = "-q $config{quality}";
|
|
$bq = "-b $config{bitrate}" if ($config{use_bitrate});
|