no -1's in num seeds and peers
This commit is contained in:
parent
798efb7183
commit
b92a704e43
|
@ -611,8 +611,8 @@ static PyObject *torrent_get_torrent_state(PyObject *self, PyObject *args)
|
||||||
"total_size", double(i.total_size()),
|
"total_size", double(i.total_size()),
|
||||||
"piece_length", long(i.piece_length()),
|
"piece_length", long(i.piece_length()),
|
||||||
"num_pieces", long(i.num_pieces()),
|
"num_pieces", long(i.num_pieces()),
|
||||||
"total_seeds", s.num_complete,
|
"total_seeds", s.num_complete != -1 ? s.num_complete : s.num_seeds,
|
||||||
"total_peers", s.num_incomplete,
|
"total_peers", s.num_incomplete != -1 ? s.num_incomplete : s.num_peers,
|
||||||
"is_paused", long(t.handle.is_paused()),
|
"is_paused", long(t.handle.is_paused()),
|
||||||
"is_seed", long(t.handle.is_seed()),
|
"is_seed", long(t.handle.is_seed()),
|
||||||
"total_wanted", double(s.total_wanted),
|
"total_wanted", double(s.total_wanted),
|
||||||
|
|
Loading…
Reference in New Issue