From 5a77bf4b720d9924dd7b33c7a5fe57407df9c4e1 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Fri, 8 Jun 2007 21:50:38 +0000 Subject: [PATCH] total_done to double (too large for int) --- 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 e3212f3ae..15dd1ddc9 100644 --- a/src/deluge_core.cpp +++ b/src/deluge_core.cpp @@ -620,7 +620,7 @@ static PyObject *torrent_get_torrent_state(PyObject *self, PyObject *args) long connected_peers = s.num_peers - connected_seeds; - return Py_BuildValue("{s:s,s:l,s:l,s:l,s:l,s:f,s:f,s:i,s:f,s:i,s:l,s:s,s:s,s:f,s:i,s:i,s:l,s:l,s:l,s:d,s:l,s:l,s:l,s:l,s:l,s:l,s:i,s:d,s:d}", + return Py_BuildValue("{s:s,s:l,s:l,s:l,s:l,s:f,s:f,s:i,s:f,s:i,s:l,s:s,s:s,s:f,s:i,s:i,s:l,s:l,s:l,s:d,s:l,s:l,s:l,s:l,s:l,s:l,s:d,s:d,s:d}", "name", t.handle.get_torrent_info().name().c_str(), "num_files", t.handle.get_torrent_info().num_files(), "state", s.state, @@ -647,7 +647,7 @@ static PyObject *torrent_get_torrent_state(PyObject *self, PyObject *args) "total_seeds", long(s.num_complete != -1? s.num_complete : connected_seeds), "is_paused", long(t.handle.is_paused()), "is_seed", long(t.handle.is_seed()), - "total_done", int(s.total_done), + "total_done", double(s.total_done), "total_wanted", double(s.total_wanted), "total_wanted_done", double(s.total_wanted_done)); };