# min_peers_seed = 0
# max_peers_seed = 0
# max_uploads_div = 1
# max_downloads_div = 1
# download_rate = 200
# max_uploads = 0
# upload_rate = 10
# min_peers = 40
# max_peers = 52
min_peers = 1
max_peers = 10
min_peers_seed = 10
max_peers_seed = 52
max_uploads = 0
# download_rate = 150
download_rate = 0
upload_rate = 0
session = ~/torrents/session/
# port range
port_range = 1024-65535
# Start opening ports at a random position within the port range.
port_random = yes
check_hash = yes
session_save = yes
use_udp_trackers = yes
dht = auto
dht_port = 6881
encryption = allow_incoming,enable_retry,prefer_plaintext
encoding_list = UTF-8
# Enable peer exchange (for torrents not marked private)
peer_exchange = yes
# # load from ~/torrent/torrent_auto_load/ torrent files
# schedule = watch_directory,5,5,load_start=~/torrents/torrent_auto_load/*.torrent
# # stop if deleted
# # schedule = untied_directory,5,5,stop_untied=
# # Close torrents when diskspace is low.
# schedule = low_diskspace,5,60,close_low_diskspace=1024M
# # Periodically save session data
# schedule = session_save,240,300,session_save=
# # Move files to ~/torrents/complete when file is hashed
# # system.method.set_key = event.download.hash_done,move_hashed1,"execute=mv,-u,$d.get_base_path=,~/torrents/complete;d.set_directory=~/torrents/complete"
# # Move files to ~/torrents/complete when download completes
# system.method.set_key=event.download.finished,move_complete,"execute=mv,-u,$d.get_base_path=,~/torrents/complete;d.set_directory=~/torrents/complete"
# # This is to assure that if files "disappear" of the watch folders they will be loaded again if they manage to come back.
# # schedule=reload_torrent,0,60,"start_tied="
# # ^c d.multicall=,d.start=
# # ^x d.multicall=,d.stop=
# location where new torrent data is placed, and where you should place your
# 'complete' data before you place your *.torrent file into the watch folder
directory = /mnt/d/torrents/incomplete
# schedule a timer event named 'watch_directory_1':
# 1) triggers 10 seconds after rtorrent starts
# 2) triggers at 10 second intervals thereafter
# 3) Upon trigger, attempt to load (and start) new *.torrent files found in /home/user/torrents/watch/
# 4) set a variable named 'custom1' with the value "/home/user/torrents/complete"
# NOTE: if you do not want it to automatically start the torrent, change 'load_start' to 'load'
schedule = watch_directory_1,10,10,"load_start=/home/user/torrents/torrent_auto_load/*.torrent,d.set_custom1=/home/user/torrents/complete"
# insert a method with the alias 'checkdirs1'
# 1) returns true if the current path of the torrent data is not equal to the value of custom1
# 2) otherwise, returns false
system.method.insert=checkdirs1,simple,"not=\"$equal={d.get_custom1=,d.get_base_path=}\""
# insert a method with the alias 'movecheck1'
# 1) returns true if all 3 commands return true ('result of checkdirs1' && 'torrent is 100% done', 'custom1 variable is set')
# 2) otherwise, returns false
system.method.insert=movecheck1,simple,"and={checkdirs1=,d.get_complete=,d.get_custom1=}"
# insert a method with the alias 'movedir1'
# (a series of commands, separated by ';')
# 1) "set path of torrent to equal the value of custom1";
# 2) "mv -u <current data path> <custom1 path>";
# 3) "clear custom1", "stop the torrent","resume the torrent"
# 4) stop the torrent
# 5) start the torrent (to get the torrent to update the 'base path')
system.method.insert=movedir1,simple,"d.set_directory=$d.get_custom1=;execute=mv,-u,$d.get_base_path=,$d.get_custom1=;d.set_custom1=;d.stop=;d.start="
# set a key with the name 'move_hashed1' that is triggered by the hash_done event.
# 1) When hashing of a torrent completes, this custom key will be triggered.
# 2) when triggered, execute the 'movecheck1' method and check the return value.
# 3) if the 'movecheck' method returns 'true', execute the 'movedir1' method we inserted above.
# NOTE-0: *Only* data that has had their hash checked manually with ^R [^R = Control r].
# Or on a rtorrent restart[which initiates a hash check]. Will the data move; ~/torrents/incomplete => ~/torrents/complete for example.
# NOTE-1: 'branch' is an 'if' conditional statement: if(movecheck1){movedir1}
system.method.set_key=event.download.hash_done,move_hashed1,"branch={$movecheck1=,movedir1=}"
# display only active torrents
schedule = filter_active,30,30,"view_filter = active,\"or={d.get_up_rate=,d.get_down_rate=}\""
# vim:ft=sh
Но при завершении закачки не перемещает файлы в ~/torrents/complete