This was not written by me. I'm just posting here what i found on another forum.

This is how I got this to work on Debian Jessie, rtorrent 0.9.6

This is borrowed heavily and updated off a tutorial from BTN, so credit to the author of that tutorial.

Install prerequisites;

Run as non-root user (the same user as deluge and rtorrent)


Code:
sudo apt-get install deluge-console
(you need deluge console to remove the torrents via the cli)

Convert::Bencode_XS is required, however I installed Convert::Bencode on my system prior to installing this, so maybe you can try omitting the next;

Code:
perl -MCPAN -e 'install Convert::Bencode'
Code:
perl –MCPAN – e ‘install Convert::Bencode_XS’
on my system that failed so I had to download, patch and compile manually – no big deal.

Code:
cd ~/.cpan/build
wget http://search.cpan.org/CPAN/authors/id/I/IW/IWADE/Convert-Bencode_XS-0.06.tar.gz
tar –xzf Convert-Bencode_XS-0.06.tar.gz

cd Convert-Bencode_XS-0.06/t/
wget https://rt.cpan.org/Ticket/Attachment/1433449/761974/patch-t_001_tests_t
patch -p1 < patch-t_001_tests_t
cd ..
perl Makefile.PL
make
make test
sudo make install

Install Scripts

Run as non-root user (the same user as deluge and rtorrent)

Make a folder to house the scripts;

Code:
cd ~
mkdir src
cd src
create script rtorrent_fast_resume.pl in this folder, copied from here;
rtorrent/rtorrent_fast_resume.pl at master · rakshasa/rtorrent · GitHub

create script delugeExport.sh as per the below but changed to suit your specific file locations(note you may uncomment or edit the sleep command to suit your needs);

Code:
 
#!/bin/bash
 
####################################################################
 
###             Please fill in the variables below!              ###
 
####################################################################
 
#sleep 20m
 
# Which folder are you keeping rtorrent_fast_resume.pl in?
 
dir=$HOME/src
 
 
 
# rTorrent's watch folder
 
watch=$HOME/Download/watch
 
 
 
# Do not change this unless you have knowingly changed Deluge's
 
# state folder.
 
files=$HOME/.config/deluge/state
 
 
 
###                                                              ###
 
# This script is designed to be used alongside the Execute plugin! #
 
###                                                              ###
 
 
 
        torrentid=$1
 
        torrentname=$2
 
        torrentpath=$3
 
        perl $dir/rtorrent_fast_resume.pl "$torrentpath" < "$files/$torrentid.torrent" > "$watch/$torrentname.$RANDOM.torrent"
 
        deluge-console rm "$torrentid"

make both files executable;

Code:
chmod +x rtorrent_fast_resume.pl delugeExport.sh

update .rtorrent.rc for watch folder and restart rtorrent;

Code:
schedule = watch_directory,5,5,"load.start=~/Download/watch/*.torrent,d.directory.set=~/Download"
Deluge Execute Plugin

Lastly activate the deluge execute plugin and add a task for torrent completion with the code;

~/src/delugeExport.sh

Everything should be ready to go!