erikw /.rtorrent.rc

# rTorrent configuration by Erikw
# last updated on 18/3-08

## connection

# set a port range
port_range = 6970-6999

# set random ports on startup
port_random = yes

# default download speed (0=no limit)
download_rate = 0

# default upload speed (0=no limit)
upload_rate = 40

# max upload slots per torrent
#max_uploads = 20

# enable encrypted connections
#encryption = allow_incoming

# allow tracker requests
enable_trackers = yes

# use UDP-trakers
use_udp_trackers = yes

# Enable DHT support for trackerless torrents or when all trackers are down. May be set to "disable" (completely disable DHT), "off" (do not start DHT),
# "auto" (start and stop DHT as needed), or "on" (start DHT immediately). The default is "off".
dht = auto 

# UDP port to use for DHT 
dht_port = 42011 



## downloads

# default download directory
directory = ~/downloads/leeching/

# save settings and more with sessiosn
session = ~/downloads/.sessions/

# check hash on finished downloads
#check_hash = no



## schedules

# watch for .torrents, start in a directory & set a new for later mv of the files
schedule = watch_directory_1,5,60,"load_start=~/downloads/watch/*.torrent,d.set_custom1=~/downloads/seeding/"
schedule = watch_directory_2,5,60,"load_start=~/downloads/watch/apps/*.torrent,d.set_directory=~/downloads/leeching/apps/,d.set_custom1=~/downloads/seeding/apps/"
schedule = watch_directory_3,5,60,"load_start=~/downloads/watch/ebooks/*.torrent,d.set_directory=~/downloads/leeching/ebooks/,d.set_custom1=~/downloads/seeding/ebooks/"
schedule = watch_directory_4,5,60,"load_start=~/downloads/watch/games/*.torrent,d.set_directory=~/downloads/leeching/games/,d.set_custom1=~/downloads/seeding/games/"
schedule = watch_directory_5,5,60,"load_start=~/downloads/watch/misc/*.torrent,d.set_directory=~/downloads/leeching/misc/,d.set_custom1=~/downloads/seeding/misc/"
schedule = watch_directory_6,5,60,"load_start=~/downloads/watch/movies/*.torrent,d.set_directory=~/downloads/leeching/movies/,d.set_custom1=~/downloads/seeding/movies/"
schedule = watch_directory_7,5,60,"load_start=~/downloads/watch/music/*.torrent,d.set_directory=~/downloads/leeching/music/,d.set_custom1=~/downloads/seeding/music/"

# execute the mv command when download is finished
on_finished = move_complete,"execute=mv,-u,$d.get_base_path=,$d.get_custom1= ;d.set_directory=$d.get_custom1="

# restart torrents that have been copied back
schedule = tied_directory,5,60,start_tied=

# stop deleted torrents
schedule = untied_directory,5,60,close_untied=

# stop seeding when ratio 1.5 (150 uploaded)
schedule = ratio,5,60,"stop_on_ratio=150,0,0"
	
# close torrents when diskspace gets under 1GB
schedule = low_diskspace,5,60,close_low_diskspace=1G