mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-26 01:55:15 +00:00
better way to show number of connections
This commit is contained in:
parent
9bd76e077a
commit
dead0864ad
@ -646,7 +646,6 @@ static PyObject *torrent_set_max_connections_global(PyObject *self, PyObject *ar
|
|||||||
|
|
||||||
// printf("Setting max connections: %d\r\n", max_conn);
|
// printf("Setting max connections: %d\r\n", max_conn);
|
||||||
M_ses->set_max_connections(max_conn);
|
M_ses->set_max_connections(max_conn);
|
||||||
|
|
||||||
Py_INCREF(Py_None); return Py_None;
|
Py_INCREF(Py_None); return Py_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1217,11 +1216,12 @@ static PyObject *torrent_get_session_info(PyObject *self, PyObject *args)
|
|||||||
{
|
{
|
||||||
session_status s = M_ses->status();
|
session_status s = M_ses->status();
|
||||||
|
|
||||||
return Py_BuildValue("{s:l,s:f,s:f,s:l,s:f,s:f}",
|
return Py_BuildValue("{s:l,s:f,s:f,s:ls:l,s:f,s:f}",
|
||||||
"has_incoming_connections", long(s.has_incoming_connections),
|
"has_incoming_connections", long(s.has_incoming_connections),
|
||||||
"upload_rate", float(s.payload_upload_rate),
|
"upload_rate", float(s.payload_upload_rate),
|
||||||
"download_rate", float(s.payload_download_rate),
|
"download_rate", float(s.payload_download_rate),
|
||||||
"num_peers", long(s.num_peers),
|
"num_peers", long(s.num_peers),
|
||||||
|
"num_connections", long(M_ses->num_connections()),
|
||||||
"total_downloaded", float(s.total_payload_download),
|
"total_downloaded", float(s.total_payload_download),
|
||||||
"total_uploaded", float(s.total_payload_upload));
|
"total_uploaded", float(s.total_payload_upload));
|
||||||
}
|
}
|
||||||
|
@ -1091,7 +1091,7 @@ window, please enter your password"))
|
|||||||
def update_statusbar_and_tray(self):
|
def update_statusbar_and_tray(self):
|
||||||
plugin_messages = self.plugins.get_plugin_tray_messages()
|
plugin_messages = self.plugins.get_plugin_tray_messages()
|
||||||
core_state = self.manager.get_state()
|
core_state = self.manager.get_state()
|
||||||
connections = core_state['num_peers']
|
connections = core_state['num_connections']
|
||||||
if self.config.get("max_connections_global") < 0 :
|
if self.config.get("max_connections_global") < 0 :
|
||||||
max_connections = _("Unlimited")
|
max_connections = _("Unlimited")
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user