Custom command argument quoting not working

Request Type:

MCEBuddy Version and Type (32bit or 64bit):
MCEBuddy 2.4.7 32bit

Operating System and Type (32bit or 64bit):
Windows 7 Professional 32-bit

Summary of the problem or suggestion:
I had been using the MCEBuddy 2.4.7 32bit - 20170627 beta release with a profile that uses custom commands. Since upgrading to the release of 2.4.7, those commands no longer properly quote the arguments passed to the custom commands. From my profiles.conf:

PostCustomCommandParameters="source="%convertedfile%" orig="%sourcefile%" delete=true"

In the 20170627 release, the parameters would come through with the quotes (e.g., TvRecordingMover.exe source=“D:\Output\Some File.mkv” orig=“D:\DVR\Some File.mkv” delete=true). After updating, the parameters no longer have quotes (e.g., TvRecordingMover.exe source=D:\Output\SomeFile.mkv orig=D:\DVR\SomeFile.mkv delete=true), which causing parsing errors with files that contain spaces (which is all of them). Did something change? Thanks.

attach the conversion log

Of course, when I reverted back to the last working version for me, my old conversion logs were removed. I’ll have to recreate with the release version during some downtime.

There’s no change, the parameters are being passed exactly as specified in the custom command.

Try to remove the extra quotes around the command parameters, it should look like this:

PostCustomCommandParameters=source="%convertedfile%" orig="%sourcefile%" delete=true

Each program processes the inputs parameters and quotes in a different way, some can’t handle total wrapping of quotes while others can’t handle nested quotes.

For example, when using command line, windows always connects the quotes in pairs and breaks the parameters at the next next space, so when you’re using the following command line parameters:

“source=”%convertedfile%" orig="%sourcefile%" delete=true"

Windows command line will translate that into the following parameters:

Time.mp4" orig="C:\Users\ramit\Desktop\Continuum
2015-02-25.ts" delete=true"

However when you use (without the leading and ending quotes):

source="%convertedfile%" orig="%sourcefile%" delete=true

Windows command line will translate that into:

"C:\Users\Public\Videos\Continuum\Season 01\S01E09-Family Time.mp4"
"C:\Users\ramit\Desktop\Continuum - S01E9 - 2015-02-25.ts"