I know this isn't an rtorrent support forum, but I know a lot of the members here know a thing or two about rtorrent scripting so I thought I might ask for some help.
I'm trying to get a script to run on torrent completion. I tried this in my rtorrent.rc file:
system.method.set_key = event.download.finished,toSickbeard,"execute={/home/andrew/.config/sickbeard/rtorrentToSickBeard.py,$d.get_base_path=,$d.get_name=,$d.get_custom1=}"
And this is working great. The rtorrentToSickBeard.py script is just writing it's arguments to a text file for testing. All three of those parameters get's passed to my script and get written to a test file.
Now what I want is to add a branch command to this so that it only executes if the torrent's label equals "tv".
This is what I have:
# Method that returns true if the lable is tv
system.method.insert=isSickbeard,simple,"equal={$d.get_custom1=,tv}"
system.method.set_key = event.download.finished,toSickbeard,"branch=$isSickbeard=,\"execute={/home/andrew/.config/sickbeard/rtorrentToSickBeard.py,$d.get_base_path=,$d.get_name=,$d.get_custom1=}\""
This isn't working at all. Nothing happens. I have log.execute=/tmp/exec.log in my config and I'm not seeing anything in there as to what's going on. Can anyone see anything wrong with my syntax? I can't find very much info on the equal command so I'm not sure if I'm using it right.
I'm trying to get a script to run on torrent completion. I tried this in my rtorrent.rc file:
system.method.set_key = event.download.finished,toSickbeard,"execute={/home/andrew/.config/sickbeard/rtorrentToSickBeard.py,$d.get_base_path=,$d.get_name=,$d.get_custom1=}"
And this is working great. The rtorrentToSickBeard.py script is just writing it's arguments to a text file for testing. All three of those parameters get's passed to my script and get written to a test file.
Now what I want is to add a branch command to this so that it only executes if the torrent's label equals "tv".
This is what I have:
# Method that returns true if the lable is tv
system.method.insert=isSickbeard,simple,"equal={$d.get_custom1=,tv}"
system.method.set_key = event.download.finished,toSickbeard,"branch=$isSickbeard=,\"execute={/home/andrew/.config/sickbeard/rtorrentToSickBeard.py,$d.get_base_path=,$d.get_name=,$d.get_custom1=}\""
This isn't working at all. Nothing happens. I have log.execute=/tmp/exec.log in my config and I'm not seeing anything in there as to what's going on. Can anyone see anything wrong with my syntax? I can't find very much info on the equal command so I'm not sure if I'm using it right.