Disabling http://retracker.local/ on torrent start

das329717

Member
May 25, 2018
928
0
16
Some Russian trackers add a tracker to their torrents called "retracker.local". So that your network admin can setup a local tracker which enables people behind the same private network to peer with each other. This is all well and good, except for most people this address doesn't exists causing the torrent to give an error. It doesn't affect the performance of the torrent but it will always show as having an error, which makes it difficult to spot torrents with actual errors. So I made a quick script to disable that tracker when adding new torrents, that I wanted to share in case anyone else ran into the same issue.

Code:
system.method.set_key = event.download.inserted_new,disable_retracker,"execute={~/disable_retracker.py,$d.get_hash=}".rtorrent.rc

Code:
#!/usr/bin/env python

import xmlrpclib, os, sys

rid = sys.argv[1]

rtorrent = xmlrpclib.ServerProxy('http://localhost/rutorrent/RPC2')

trackers = rtorrent.t.multicall(rid, '', 't.is_enabled=', 't.get_url=')
for i,tracker in enumerate(trackers):
if tracker[0] and tracker[1] == 'http://retracker.local/announce':
rtorrent.t.set_enabled(rid, i, 0)
print 'Found enabled retracker, disabling'
disable_rtorrent.py
 

shwetha17

Member
May 24, 2018
785
0
16
Hello, I'm interested to implement your script, because indeed the "retracker.local" is very annoying.
But I didn't get it to work properly, can you please assist?
What do I have to put exactly at 'http://localhost/rutorrent/RPC2', my rutorrent url?
Any way to troubleshoot ?
 

somus1735

Member
May 25, 2018
833
0
16
Try to use svn version of ruTorrent, and check plugin 'retrackers'. It has option for automatic deletion of trackers.
 

jith45

Member
May 25, 2018
960
0
16
Are you sure that this retracker plugin can remove trackers? Seems more oriented to add trackers...
How do I have to set it to delete?