Scrape tracker if tracker doesn't report number of peers on reply.
This commit is contained in:
parent
bff0e3f8d5
commit
300b4a7905
|
@ -764,6 +764,9 @@ Space:") + " " + nice_free)
|
|||
self.set_supp_torrent_state_val(event['unique_ID'],
|
||||
"tracker_status",
|
||||
_("Announce OK"))
|
||||
if event['num_complete'] == -1 or event['num_incomplete'] == -1:
|
||||
self.scrape_tracker(event['unique_ID'])
|
||||
|
||||
elif event['event_type'] is self.constants['EVENT_TRACKER_ALERT']:
|
||||
match = re.search('tracker:\s*".*"\s*(.*)', event["message"])
|
||||
message = match and match.groups()[0] or ""
|
||||
|
|
|
@ -1584,10 +1584,11 @@ std::cout << asctime(timeinfo) << " torrent_pop_event()" << std::endl;
|
|||
return NULL;
|
||||
|
||||
if (handle_exists(handle))
|
||||
return Py_BuildValue("{s:i,s:i,s:s}",
|
||||
return Py_BuildValue("{s:i,s:i,s:i,s:i,s:s}",
|
||||
"event_type", EVENT_TRACKER_REPLY,
|
||||
"unique_ID",
|
||||
M_torrents->at(index).unique_ID,
|
||||
"unique_ID", M_torrents->at(index).unique_ID,
|
||||
"num_complete", handle.status().num_complete,
|
||||
"num_incomplete", handle.status().num_incomplete,
|
||||
"message", a->msg().c_str());
|
||||
else
|
||||
{ Py_INCREF(Py_None); return Py_None; }
|
||||
|
|
Loading…
Reference in New Issue