Change category of torrent using qBittorrent web API how?

108 Views Asked by At

I have a script to add torrents automatically by a bash script where the important command looks like this: curl -s -X POST --form "category=$CATEGORY" --form "tags=$TAG" --form root_folder=false --form "torrents=@$SAFENAME" $SERVER/api/v2/torrents/add -s -o /dev/null

I want to adjust this to be able to change the category of the added torrents individually, but I can not figure out how to formulate the command to make it happen.

Can anyone help me please. I would really appreciate it.

I can not figure this out myself unfortunately...

1

There are 1 best solutions below

0
SwedishGojira On

I finally got it! This is the command that worked for me, in case someone will read this in the future. curl -s -X POST --data "hashes=$HASH&category=$CATEGORY" $SERVER/api/v2/torrents/setCategory -s -o /dev/null And the category needs to be urlencoded in case it contains any special characters.