no -1's in num seeds and peers

This commit is contained in:
Alon Zakai 2007-05-30 18:53:54 +00:00
parent 798efb7183
commit b92a704e43
1 changed files with 2 additions and 2 deletions

View File

@ -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),