diff --git a/src/core.py b/src/core.py index 71b5e3210..04c050785 100644 --- a/src/core.py +++ b/src/core.py @@ -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 "" diff --git a/src/deluge_core.cpp b/src/deluge_core.cpp index 83415e487..1abdb6842 100644 --- a/src/deluge_core.cpp +++ b/src/deluge_core.cpp @@ -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; }