Page 1 of 1

[DOCKER] Qbittorrent failed to run amc script

Posted: 03 Jul 2025, 09:09
by sebsez
Hi,

Apologies, I'm sure I am doing something fundamentally wrong, but I'm not proficient with scripting at all...

My setup is qbittorrent running in container manager on synology NAS file filebot also running on the same NAS.

I've configured qbittorrent to execute external program on torrent completion using the following script:

Shell: Select all

filebot -script fn:amc --output "volume1/Plex Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=amc.txt unsorted=y music=y artwork=y "ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"
In Qbittorrent I get the following error in the log:

Code: Select all

Failed to run external program. Torrent: "torrent name". Command: `filebot -script fn:amc --output "volume1/Plex Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=amc.txt unsorted=y music=y artwork=y "ut_label=" "ut_title=xxx" "ut_kind=multi" "ut_dir=/seeding/xxx`
Appreciate if you could set me straight.

Let me know if further info required.

Thanks & Regards

Re: Qbittorrent failed to run amc script

Posted: 03 Jul 2025, 09:27
by rednoah
:?: Which qBT container are you using? Does the filebot command-line tool exist within the container environment?

:idea: Remember that the docker container that is running qBT and your Synology DSM host are two different computers for all accounts and purposes. Your container cannot directly run commands on your Synology DSM host and vice versa.



:arrow: You can use FileBot Node › Remote Command Execution to run a curl command on your qBT container to send a HTTP request to a separate filebot-node container which then executes the desired filebot command. Let me know if you need help with that.

Re: Qbittorrent failed to run amc script

Posted: 03 Jul 2025, 10:20
by sebsez
Thanks for the prompt response.
Which qBT container are you using? Does the filebot command-line tool exist within the container environment?
I suspected this may be the issue... I'm running linuxserver-qbittorrent

Filebot is running natively on DSM
You can use FileBot Node › Remote Command Execution to run a curl command on your qBT container to send a HTTP request to a separate filebot-node container which then executes the desired filebot command. Let me know if you need help with that.
So would I need to install Filebot Node in my qBT container to then send commands to Filebot running on the DSM?

If you could give me some guidance on this that would be a huge help.

Thanks

Re: Qbittorrent failed to run amc script

Posted: 03 Jul 2025, 11:02
by rednoah
sebsez wrote: 03 Jul 2025, 10:20 So would I need to install Filebot Node in my qBT container to then send commands
:?: Can you install additional software into your qBT container?

:idea: If you are using the linuxserver-qbittorrent container (instead of building your own container that contains both qBT and filebot) then you are probably not able to just install additional software. If you could install filebot-node into your qBT container then you would instead install filebot and be done with it.



:!: You could install FileBot Node on your Synology DSM, but the native Synology DSM package of FileBot Node integrates with cookie-based native Synology DSM authentication. You will find it difficult to log into your Synology DSM from your qBT container. How does qBT know your DSM login? Do you want qBT to know your DSM login?




:arrow: You would run 2 containers. 1 dedicated qBT container that is just OS / qBT / qBT WebUI and 1 dedicated filebot-node container that is just OS / FileBot / FileBot Node WebUI.

Step 1: Run a filebot-node container:

Shell: Select all

docker run --rm -it -v "data:/data" -v "/volume1:/volume1" -e FILEBOT_NODE_AUTH=BASIC -e FILEBOT_NODE_AUTH_USER="username" -e FILEBOT_NODE_AUTH_PASS="password" -p 5452:5452 rednoah/filebot:node
** Note that the container has its own username / password set by you.
** The volume mount -v "/volume1:/volume1" must be the same on all containers so that each container sees the file system the exact same way.
** You can create and run a docker on the command-line for testing. You may be used to doing the same via docker-compose YML configuration files. It's the same thing.


Step 2: Run a command remotely via curl from another machine just to see if it works:

Shell: Select all

curl --user "username:password" "http://IP:5452/command" --data "
-script
fn:sysinfo
"

Step 3: Integrate with qBT:

Shell: Select all

for LINE in -script fn:amc --output "/volume1/Plex Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=amc.txt unsorted=y music=y artwork=y "ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"; do echo $LINE; done | curl --user "username:password" "http://IP:5452/command" --data-binary "@-"
** I'm not sure how qBT works. Can it run multi-line commands? Can it run bash code? Here's a 1-liner that might work. Does work from bash in any case. You may need to have qBT run a *.sh shell script instead if qBT cannot run complex commands.




:arrow: I have tried to predict all the small issues you will likely run into, but you will likely find even more. Please let me know how you fare.