Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run external program on torrent added ERROR #19185

Open
feroxes opened this issue Jun 17, 2023 · 2 comments
Open

Run external program on torrent added ERROR #19185

feroxes opened this issue Jun 17, 2023 · 2 comments
Labels
Triggers Procedures activated when state changes occur (i.e. torrent completes)

Comments

@feroxes
Copy link

feroxes commented 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

@glassez
Copy link
Member

glassez commented Jun 17, 2023

@Chocobo1, could you comment?

@Chocobo1
Copy link
Member

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

@luzpaz luzpaz added the Triggers Procedures activated when state changes occur (i.e. torrent completes) label Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triggers Procedures activated when state changes occur (i.e. torrent completes)
Projects
None yet
Development

No branches or pull requests

4 participants