Remove finished torrents using uTorrent’s api


I quickly wrote a small script to manage my torrents on my Windows seedbox that use uTorrent.
The reason for this script is that I frequently had to manually login to the server and delete the torrents, or using the webui. That’s quite boring, so writing a small bash script that would do that for me was needed.
The script is written in bash, and it uses uTorrents API. This script requires that the torrent has the status “Finished” so I setup uTorrent so that it will stop seeding at a certain time or ratio. (Preferences -> Queueing -> Seeding Goal).
By ticking the option “Limit the upload rate to…” and put the value 0 into the box will stop the torrent once either of the above criteria is met i.e status “Finished”.