1
0
mirror of https://github.com/moex3/flac2mp3.pl synced 2024-11-24 12:25:55 -05:00

Create trgt dir if ! exists, and do some ' escape

(untested lol)
This commit is contained in:
moex3 2021-07-23 19:58:34 +02:00
parent dfb21dfc2b
commit f8bd0b2004
No known key found for this signature in database
GPG Key ID: ABC92E00CF59BB7A

View File

@ -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 {