Compare commits

2 Commits

2 changed files with 43 additions and 12 deletions

View File

@@ -567,7 +567,6 @@ def rtorrent_bind_address_directive(rtorrent_ref, rtorrent_version=None):
return "network.bind_address.set" return "network.bind_address.set"
return "network.bind_address.ipv4.set" return "network.bind_address.ipv4.set"
def build_rtorrent_config_content(username, scgi_port, torrent_port, bind_address_directive): def build_rtorrent_config_content(username, scgi_port, torrent_port, bind_address_directive):
return f""" return f"""
## https://git.linuxiarz.pl/gru/tools_scripts/_edit/master/install_rtorrent.py ## https://git.linuxiarz.pl/gru/tools_scripts/_edit/master/install_rtorrent.py
@@ -597,13 +596,29 @@ schedule2 = watch_directory,60,60,load.normal=/home/{username}/watch/*.torrent
ratio.max.set = -1 ratio.max.set = -1
network.xmlrpc.size_limit.set = 33554432 network.xmlrpc.size_limit.set = 33554432
network.http.max_open.set = 64
network.max_open_sockets.set = 8192
network.max_open_files.set = 32768
network.http.dns_cache_timeout.set = 0
#pieces.memory.max.set = 1800M
""".lstrip()
network.http.max_open.set = 64
network.max_open_sockets.set = 1024
network.max_open_files.set = 8192
network.http.dns_cache_timeout.set = 25
network.http.ssl_verify_peer.set = 0
network.send_buffer.size.set = 4M
network.receive_buffer.size.set = 4M
throttle.min_peers.normal.set = 30
throttle.max_peers.normal.set = 150
throttle.min_peers.seed.set = -1
throttle.max_peers.seed.set = -1
throttle.max_downloads.global.set = 300
throttle.max_uploads.global.set = 300
throttle.max_downloads.set = 20
throttle.max_uploads.set = 20
trackers.numwant.set = 80
pieces.hash.on_completion.set = 0
#pieces.memory.max.set = 1024M
""".lstrip()
def write_rtorrent_config(user_home, username, scgi_port, torrent_port, bind_address_directive, *, force_config=False): def write_rtorrent_config(user_home, username, scgi_port, torrent_port, bind_address_directive, *, force_config=False):
config_path = Path(user_home) / ".rtorrent.rc" config_path = Path(user_home) / ".rtorrent.rc"

View File

@@ -568,7 +568,6 @@ def rtorrent_bind_address_directive(rtorrent_ref, rtorrent_version=None):
return "network.bind_address.set" return "network.bind_address.set"
return "network.bind_address.ipv4.set" return "network.bind_address.ipv4.set"
def build_rtorrent_config_content(username, scgi_port, torrent_port, bind_address_directive): def build_rtorrent_config_content(username, scgi_port, torrent_port, bind_address_directive):
return f""" return f"""
## https://git.linuxiarz.pl/gru/tools_scripts/_edit/master/install_rtorrent.py ## https://git.linuxiarz.pl/gru/tools_scripts/_edit/master/install_rtorrent.py
@@ -598,11 +597,28 @@ schedule2 = watch_directory,60,60,load.normal=/home/{username}/watch/*.torrent
ratio.max.set = -1 ratio.max.set = -1
network.xmlrpc.size_limit.set = 33554432 network.xmlrpc.size_limit.set = 33554432
network.http.max_open.set = 64 network.http.max_open.set = 64
network.max_open_sockets.set = 8192 network.max_open_sockets.set = 1024
network.max_open_files.set = 32768 network.max_open_files.set = 8192
network.http.dns_cache_timeout.set = 0 network.http.dns_cache_timeout.set = 25
#pieces.memory.max.set = 1800M network.http.ssl_verify_peer.set = 0
network.send_buffer.size.set = 4M
network.receive_buffer.size.set = 4M
throttle.min_peers.normal.set = 30
throttle.max_peers.normal.set = 150
throttle.min_peers.seed.set = -1
throttle.max_peers.seed.set = -1
throttle.max_downloads.global.set = 300
throttle.max_uploads.global.set = 300
throttle.max_downloads.set = 20
throttle.max_uploads.set = 20
trackers.numwant.set = 80
pieces.hash.on_completion.set = 0
#pieces.memory.max.set = 1024M
""".lstrip() """.lstrip()