add local discovery of peers

This commit is contained in:
Marcos Pinto 2007-11-08 02:44:22 +00:00
parent e2e507b94b
commit d94694fc73
6 changed files with 569 additions and 531 deletions

View File

@ -2,6 +2,7 @@ Deluge 0.5.7 (xx November 2007)
* Manual force-recheck
* Blocklist plugin will now display errors, instead of just crashing on a bad
list or wrong type
* Local discovery of peers
* Fix ratio bugs (hopefully for the last time)
* UI warning on full HD - no longer just silently pauses torrents
* Replace SimpleRSS with FlexRSS

File diff suppressed because it is too large Load Diff

View File

@ -78,6 +78,7 @@ PREF_FUNCTIONS = {
"max_upload_speed_bps" : deluge_core.set_upload_rate_limit,
"enable_dht" : None, # not a normal pref in that is is applied only on start
"use_upnp" : deluge_core.use_upnp,
"use_lsd" : deluge_core.use_lsd,
"use_natpmp" : deluge_core.use_natpmp,
"use_utpex" : deluge_core.use_utpex,
}

View File

@ -1654,6 +1654,22 @@ static PyObject *torrent_use_upnp(PyObject *self, PyObject *args)
}
static PyObject *torrent_use_lsd(PyObject *self, PyObject *args)
{
python_long action;
PyArg_ParseTuple(args, "i", &action);
if (action){
M_ses->start_lsd();
}
else{
M_ses->stop_lsd();
}
Py_INCREF(Py_None); return Py_None;
}
static PyObject *torrent_use_natpmp(PyObject *self, PyObject *args)
{
python_long action;
@ -2037,6 +2053,7 @@ static PyMethodDef deluge_core_methods[] =
{"add_range_to_IP_filter", torrent_add_range_to_IP_filter, METH_VARARGS, "."},
{"set_IP_filter", torrent_set_IP_filter, METH_VARARGS, "."},
{"use_upnp", torrent_use_upnp, METH_VARARGS, "."},
{"use_lsd", torrent_use_lsd, METH_VARARGS, "."},
{"use_natpmp", torrent_use_natpmp, METH_VARARGS, "."},
{"use_utpex", torrent_use_utpex, METH_VARARGS, "."},
{"set_ratio", torrent_set_ratio, METH_VARARGS, "."},

View File

@ -100,6 +100,7 @@ class PreferencesDlg:
self.glade.get_widget("chk_tracker_proxy").set_active(self.preferences.get("tracker_proxy"))
self.glade.get_widget("chk_dht_proxy").set_active(self.preferences.get("dht_proxy"))
self.glade.get_widget("chk_upnp").set_active(self.preferences.get("use_upnp"))
self.glade.get_widget("chk_lsd").set_active(self.preferences.get("use_lsd"))
self.glade.get_widget("chk_random_port").set_active(self.preferences.get("random_port"))
self.glade.get_widget("chk_natpmp").set_active(self.preferences.get("use_natpmp"))
self.glade.get_widget("chk_utpex").set_active(self.preferences.get("use_utpex"))
@ -212,6 +213,7 @@ class PreferencesDlg:
self.preferences.set("dht_proxy", self.glade.get_widget("chk_dht_proxy").get_active())
self.preferences.set("web_proxy", self.glade.get_widget("chk_web_proxy").get_active())
self.preferences.set("use_upnp", self.glade.get_widget("chk_upnp").get_active())
self.preferences.set("use_lsd", self.glade.get_widget("chk_lsd").get_active())
self.preferences.set("tracker_proxy_type", self.glade.get_widget("combo_tracker_proxy_type").get_active())
self.preferences.set("dht_proxy_type", self.glade.get_widget("combo_dht_proxy_type").get_active())
self.preferences.set("web_proxy_type", self.glade.get_widget("combo_web_proxy_type").get_active())

View File

@ -124,6 +124,7 @@ if common.windows_check():
"use_default_dir" : False,
"use_natpmp" : False,
"use_upnp" : True,
"use_lsd" : True,
"use_utpex" : True,
"new_releases" : True,
"window_height" : 480,
@ -232,6 +233,7 @@ else:
"use_default_dir" : False,
"use_natpmp" : False,
"use_upnp" : True,
"use_lsd" : True,
"use_utpex" : True,
"new_releases" : True,
"window_height" : 480,