From b92a704e43dd18ff59babfef279bd969c9b45a61 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 30 May 2007 18:53:54 +0000 Subject: [PATCH] no -1's in num seeds and peers --- src/deluge_core.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/deluge_core.cpp b/src/deluge_core.cpp index 55be1b9fc..cbeb606c3 100644 --- a/src/deluge_core.cpp +++ b/src/deluge_core.cpp @@ -611,8 +611,8 @@ static PyObject *torrent_get_torrent_state(PyObject *self, PyObject *args) "total_size", double(i.total_size()), "piece_length", long(i.piece_length()), "num_pieces", long(i.num_pieces()), - "total_seeds", s.num_complete, - "total_peers", s.num_incomplete, + "total_seeds", s.num_complete != -1 ? s.num_complete : s.num_seeds, + "total_peers", s.num_incomplete != -1 ? s.num_incomplete : s.num_peers, "is_paused", long(t.handle.is_paused()), "is_seed", long(t.handle.is_seed()), "total_wanted", double(s.total_wanted),