summaryrefslogtreecommitdiff
path: root/src/torrent.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-12 11:59:36 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-12 11:59:36 +0000
commit1ec4eb81c9bb4f6d720e0f77e504b1ca01d408b5 (patch)
treeda297a18d171f6024b9d8d16f6f5e96b7f19fc9c /src/torrent.c
parent2aacfd5e691a7c8b37c2fc1dbcf001615c205b97 (diff)
use the same function used for torrent/recheck progress in peer progress.
Diffstat (limited to 'src/torrent.c')
-rw-r--r--src/torrent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/torrent.c b/src/torrent.c
index 7376c15..b848629 100644
--- a/src/torrent.c
+++ b/src/torrent.c
@@ -169,12 +169,12 @@ gboolean torrent_get_is_finished(JsonObject * t)
gdouble torrent_get_percent_done(JsonObject * t)
{
- return json_int_or_double_to_double(json_object_get_member(t, FIELD_PERCENTDONE));
+ return json_double_to_progress(json_object_get_member(t, FIELD_PERCENTDONE));
}
gdouble torrent_get_recheck_progress(JsonObject * t)
{
- return json_int_or_double_to_double(json_object_get_member(t, FIELD_RECHECK_PROGRESS));
+ return json_double_to_progress(json_object_get_member(t, FIELD_RECHECK_PROGRESS));
}
guint32 torrent_get_flags(JsonObject * t, gint64 rpcv, gint64 status, gint64 downRate, gint64 upRate)