mirror of
https://github.com/moex3/flac2mp3.pl
synced 2024-11-24 20:26:35 -05:00
Create trgt dir if ! exists, and do some ' escape
(untested lol)
This commit is contained in:
parent
dfb21dfc2b
commit
f8bd0b2004
@ -93,6 +93,10 @@ if (scalar(@ARGV) != 2) {
|
||||
|
||||
my ($IDIR, $ODIR) = @ARGV;
|
||||
|
||||
if (!-e $ODIR) {
|
||||
mkdir $ODIR;
|
||||
}
|
||||
|
||||
find({ wanted => \&iterFlac, no_chdir => 1 }, $IDIR);
|
||||
|
||||
sub iterFlac {
|
||||
@ -120,7 +124,8 @@ sub iterFlac {
|
||||
argsToTags($tags);
|
||||
my $tagopts = tagsToOpts($tags);
|
||||
|
||||
qx(flac -cd "$flac" | lame -V0 -S --vbr-new --add-id3v2 @$tagopts - "$dest");
|
||||
$flac =~ s!'!'\\''!g;
|
||||
qx(flac -cd '$flac' | lame -V0 -S --vbr-new --add-id3v2 @$tagopts - "$dest");
|
||||
}
|
||||
|
||||
sub argsToTags {
|
||||
|
Loading…
Reference in New Issue
Block a user