Добавлен поисковик RuTracker. SOCKS-прокси для подключения к трекерам

This commit is contained in:
Бородин Роман committed 2020-04-28 22:24:21 +03:00
1 parent be14440f2f
commit c4e6d7763e
10 files changed
+109 -18

No files matched your search

+8 -1
View File
@@ -39,10 +39,17 @@ def file_url(path):
return path
def get_engine(torrent_uri):
if option.get_boolean('use_socks_for_trackers'): # @UndefinedVariable
proxy = {
'host': option['socks_ip'],
'port': int(option['socks_port'])
}
else:
proxy = None
return Engine(uri=file_url(torrent_uri), download_path=storage_download_dir,
encryption=1, keep_complete=False, keep_incomplete=False,
dht_routers=["router.bittorrent.com:6881", "router.utorrent.com:6881"], use_random_port=False, listen_port=6881,
user_agent='', enable_dht=True)
user_agent='', enable_dht=True, proxy=proxy)
while not option['storage_dir']:
dialog = xbmcgui.Dialog()
dialog.ok(localize(33000), localize(33051))