qBittorrent proper argument quoting

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

qBittorrent proper argument quoting

Post by devster »

Hello,
I'm currently using qBittorrent to launch FB.
qBt uses this bit: https://github.com/qbittorrent/qBittorr ... n.cpp#L285 to replace command arguments with file names and paths.
In order to accomodate arguments with spaces I'm using the following:

Code: Select all

/scripts/qbittorrent-postprocess -N '%N' -L '%L' -G '%G' -F '%F' -R '%R' -D '%D' -C '%C' -Z '%Z' -T '%T' -I '%I'
script line.
qbittorrent-postprocess is a bash script.
Issue arises when a file or path has a single quote in it.
While I'm waiting for someone who has the skill to fulfill my wish (https://github.com/qbittorrent/qBittorrent/issues/10417), what would be the better strategy to cope with arbitrary inputs.
I did try double quotes, but I think they get removed somehow.
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: qBittorrent proper argument quoting

Post by rednoah »

"..." should work though, at least it worked last time I tried tested things with qBT:
viewtopic.php?f=4&t=215#p9774
:idea: Please read the FAQ and How to Request Help.
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: qBittorrent proper argument quoting

Post by devster »

Mh, then I need to figure out why it's stripping them in my setup.
Thank you.
I only work in black and sometimes very, very dark grey. (Batman)
Post Reply