Run external program on torrent added ERROR #14733

Open
opened 2026-02-22 01:22:37 -05:00 by deekerman · 2 comments
Owner

Originally created by @feroxes on GitHub (Jun 17, 2023).

qBittorrent & operating system versions

qBittorrent: 4.5.3-r0-2
Operating system: Home Assistant

What is the problem?

Trying to execute command on torrent added but got an error:
curl: (3) unmatched close brace/bracket in URL position 31:
"switch.passage_switch_center"}'

Examples of commands I have tried to use:

  1. curl -X POST -H "Authorization: Bearer TOKEN -H "Content-Type: application/json" -d "{-backslash-"entity_id-backslash-": -backslash-"switch.passage_switch_center-backslash-"}" http://x.x.x.x:port/api/services/switch/toggle

-backslash- == \ github do not show it correctly

  1. curl -X POST -H "Authorization: Bearer TOKEN -H "Content-Type: application/json" -d ‘{“entity_id": "switch.passage_switch_center”}’ http://x.x.x.x:PORT/api/services/switch/toggle

Both returns the same error.

Steps to reproduce

  1. Go to Settings
  2. Go to Downloads tab
  3. Enable "Run external program on torrent added:"
  4. Put command to the input field with correct token, home assistant address and entity_id
  5. Save settings
  6. Add torrent
  7. Check logs

Additional context

No response

Log(s) & preferences file(s)

No response

Originally created by @feroxes on GitHub (Jun 17, 2023). ### qBittorrent & operating system versions qBittorrent: 4.5.3-r0-2 Operating system: Home Assistant ### What is the problem? Trying to execute command on torrent added but got an error: curl: (3) unmatched close brace/bracket in URL position 31: "switch.passage_switch_center"}' Examples of commands I have tried to use: 1) curl -X POST -H "Authorization: Bearer TOKEN -H "Content-Type: application/json" -d "{-backslash-"entity_id-backslash-": -backslash-"switch.passage_switch_center-backslash-"}" http://x.x.x.x:port/api/services/switch/toggle -backslash- == \ github do not show it correctly 2) curl -X POST -H "Authorization: Bearer TOKEN -H "Content-Type: application/json" -d ‘{“entity_id": "switch.passage_switch_center”}’ http://x.x.x.x:PORT/api/services/switch/toggle Both returns the same error. ### Steps to reproduce 1. Go to Settings 2. Go to Downloads tab 3. Enable "Run external program on torrent added:" 4. Put command to the input field with correct token, home assistant address and entity_id 5. Save settings 6. Add torrent 7. Check logs ### Additional context _No response_ ### Log(s) & preferences file(s) _No response_
Author
Owner

@glassez commented on GitHub (Jun 17, 2023):

@Chocobo1, could you comment?

@glassez commented on GitHub (Jun 17, 2023): @Chocobo1, could you comment?
Author
Owner

@Chocobo1 commented on GitHub (Jun 17, 2023):

I would try to put the command into a shell script file and invoke the script instead: /bin/sh <full_path_to_script>

@Chocobo1 commented on GitHub (Jun 17, 2023): I would try to put the command into a shell script file and invoke the script instead: `/bin/sh <full_path_to_script>`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#14733
No description provided.