+ if ($lame_options) {
+ push(@tmp, $lame_options);
+ } else {
+ push(@tmp, '--preset standard');
+ }
+ $quiet and push(@tmp, '--quiet');
+ $verbose and push(@tmp, '--verbose');
+ $lame_options = join(' ', @tmp);
+
+ # We'll be putting these in single quotes, so we need to escape
+ # any single quotes in the filename by closing the quote ('),
+ # putting an escaped quote (\'), and then reopening the quote (').
+ for ($fn, $title, $artist, $album, $date) {
+ s/'/'\\''/g;
+ }
+
+ $outfile = sprintf("$artist ($album) \%02s $title.mp3", $track);