Possible to use rutorrent without ajax interface?

lisas4567

Member
May 25, 2018
773
0
16
Hi, I dunno if this is the right section for this. If it is not, I'm sorry - I tried to pick the most appropriate section for my hard to categorize question.

Ok, so basically what I want to do is be able to control rutorrent from an automated interface.

Id like to be able to do (if possible):
List active torrents, showing if they are done or the % downloaded and optionally how much seed ratio they have.
Stop torrents
Remove torrents

Id like to do this in conjunction with an automated ftp, so I can have it on a regular basis (say every night) download anything that's finished, stop any torrents that have optionally met a seeding criteria.

I know I can use a watch folder to add new torrents, so that's no a problem.

I know this is a little different than the normal intended usage for rutorrent, the webapp driven interface is very nice, but would be very hard, if not impossible to automate.

Has anyone done something similar to what I'm asking? I'd of course put the rest together involving the requests to stop/remove torrents and the ftp stuff. I just need kind of a "backdoor" to access the info rutorrent provides in a simple and consistent manner. As far as security goes, I'm planning on using htaccess to protect that access.

Any help on this would be greatly appreciated.
 

saroos1

Member
May 25, 2018
718
0
16
rutorrent does the display stuff and ratio management thing perfectly fine. wink.gif

For the rest, https://code.google.com/p/pyroscope/wiki/RtControlExamples

The "do stuff exactly once on completed items" skeleton is this:
Code
guard=once_only
set -e
rtcontrol --from-view complete -qohash tagged=\!"$guard" | \
while read hash; do
# Do stuff with item $hash
: ...

# Tag with guard when successful
rtcontrol -q hash=$hash --tag "$guard" --yes --cron
done

Put that in a bash script, cron it, done.