DEFOPTS = 0 in pacpl.conf or .pacplrc not being respected
Linux Audio Converter / Tagger / CD Ripper
Brought to you by:
viiron
I've just installed pacpl from source (version 5.1.1) and I'm configuring it. I've copied /usr/local/etc/pacpl/pacpl.conf to ~/.pacplrc and I've changed/added these options:
DEFOPTS = 0 EOPTS = --preset extreme --id3v2-only
I run pacpl with --dryrun
and noticed that the default options are still being picked up:
paulo@monk:~/src/pacpl$ pacpl -t mp3 -r --dryrun ~/stage/cd/Jeremy\ Steig\ -\ Wayfaring\ Stranger/ Perl Audio Converter - 5.1.1 [...] debug: lame --preset extreme --id3v2-only --resample 44100 -b 320 -h "/home/paulo/stage/cd/Jeremy Steig - Wayfaring Stranger/01 - In The Beginning.27812.wav" "/home/paulo/stage/cd/Jeremy Steig - Wayfaring Stranger/01 - In The Beginning.mp3"
I changed the same options in /usr/local/etc/pacpl/pacpl.conf and removed ~/.pacplrc, but the results were the same. I don't program in Perl but glanced through the code and can't decypher why this is happening.
I experimented including --defopts 0
on the command-line and then it works as expected:
paulo@monk:~/src/pacpl$ pacpl -t mp3 --defopts 0 -r --dryrun ~/stage/cd/Jeremy\ Steig\ -\ Wayfaring\ Stranger/ Perl Audio Converter - 5.1.1 [...] debug: lame --preset extreme --id3v2-only "/home/paulo/stage/cd/Jeremy Steig - Wayfaring Stranger/01 - In The Beginning.29087.wav" "/home/paulo/stage/cd/Jeremy Steig - Wayfaring Stranger/01 - In The Beginning.mp3"
A rather curious result: I tried putting an invalid value for
DEFOPTS
in ~/.pacplrc:DEFOPTS = 2
and here's the result:
I changed this line in pacpl:
and ran it again as before, and I can see that the value for
DEFOPTS
in ~/.pacplrc is being picked up correctly, but the (wrong) results are the same:I believe I found the bug ! But I don't know Perl enough to correct it :-( It's here:
Specifically in this line:
As my ~/.pacplrc has this line:
$v
will be 0, which I imagine Pearl treats as false, so$config{$k} = $v
is not run.Well, found out how to fix the bug: replace this line:
with:
I'm working my way around git, I'll try to send a patch or perhaps submit a pull request.
Not sure if I did things in the correct/recommended way:
git diff master fix_config_value_0 >fix_config_value_0.patch
The patch is attached to this post.
when using defopts you'll need to include the --eopts option on the command line with your desired changes in quotation marks.
There's no need to use the
--eopts
command line option if you use theEOPTS
option in the configuration file. That's what I've been using. It's in your code, have a look, it's there. Your code needs fixing, it's not handling DEFOPTS correctly, as I debugged and demonstrated. I've sent you a patch, it's just a question of applying it. As you can see, it's a very simples correction. You can't just dismiss an issue like this and leave the code faulty. I'm really stunned at your complete disregard.