HydrogenAudio

Hosted Forums => foobar2000 => General - (fb2k) => Topic started by: kompot on 2012-01-05 13:21:44

Title: Converter feature: add ability to pass all/most titleformatting
Post by: kompot on 2012-01-05 13:21:44
Hello,
i've seen a request here that converter should allow embedding album art on the fly.
And recently I needed that myself. So pretty obvious way for an advanced user is to write a batch script and pass required params to it.

I wrote the following code that work quite well when called from command line like
convert.bat output.m4a < input.wav
but when I try to specify %path% as a third (%3) parameter - it just is not passed to external converter by foobar2000.
If some content tag is passed (like %album%) - everything goes well and I can get %3 in the script, but %path% doesn't work.

From the outside it seems like it should be really easy.

IF EXIST "%~d1%~p1front.jpg" (
  SET COVER=%~d1%~p1front.jpg
) ELSE (
  SET COVER=cover-not-found
)

neroAacEnc.exe -q 0.46 -ignorelength -if "%1" -of "%2"
IF NOT %COVER% == "cover-not-found" (
  echo adding cover %COVER%
  rem neroAacTag.exe "%2" "-add-cover:front:%COVER%"
)

Any thoughts?