Skip to content

Instantly share code, notes, and snippets.

@beachandbytes
Created March 28, 2015 14:21
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beachandbytes/24bf3b9a852136a950ca to your computer and use it in GitHub Desktop.
Save beachandbytes/24bf3b9a852136a950ca to your computer and use it in GitHub Desktop.
rTorrent config. Currently moves completed downloads to folders based on label (But only if label is applied before download finishes)
# rtorrent config file ß
directory = /home/hd4/accountname/torrents/data
session = /home/hd4/accountname/.config/rtorrent/sessP5,5,load_start="~/torrents/watch/*.torrent"
port_range = 57657-57657
encryption = allow_incoming,enable_retry,try_outgoing
dht = off
peer_exchange = no
check_hash = no
execute = {sh,-c,rm -f /home/hd4/accountname/.config/rtorrent/session/rpc.socket}
scgi_local = /home/hd4/accountname/.config/rtorrent/session/rpc.socket
execute = {sh,-c,chmod 0666 /home/hd4/accountname/.config/rtorrent/session/rpc.socket}
execute = {sh,-c,/usr/bin/php/home/hd4/accountname/www/rutorårent/php/initplugins.php accountname &}
max_uploads = 30
min_peers = 20
max_peers = 100
min_peers_seed = 20
max_peers_seed = 200
log.open_file = "rtorrent.log", (cat,/home/hd4/accountname/.config/rtorrent/rtorrent.log.,(system.pid))
log.add_output = "error", "rtorrent.log"
# Filebot
# system.method.set_key=event.download.finished,filebot_amc,"execute={/home/hd4/accountname/.config/rtorrent/filebot,$d.get_base_path=,$d.get_name=,$d.geßt_custom1=}"
# This works great to move the file ß∏
# Add a new method (get_finished_dir) tjat concats the torrent's label onto the base path to form a subidrectory.
system.method.insert = d.get_finished_dir,simple,"cat=/home/hd4/accountname/torrents/data/,$d.get_custom1=""
# Binds the following commands to the download finished event: Fisrt store the base path + label into temporary variable and try and create the directory.
# Next the command executes the move command on the torrent.
system.method.set_key = event.download.finished,move_complete,"d.set_directory=$d.get_finished_dir=;execute=mkdir,-p,$d.get_finished_dir=;execute=mv,-u,$d.get_base_path=,$d.get_finished_dir="
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment