From b36d3f6d35e8a95b176f3dd780cb995a5c5b7ff1 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 10 Jul 2008 19:22:49 +0000 Subject: [PATCH] (daemon) remote: clarify the % done vs. % verified a bit. Thanks to feedback from andersos --- daemon/remote.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index 731fc1fb0..69c524f0b 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -405,18 +405,19 @@ printDetails( tr_benc * top ) printf( "TRANSFER\n" ); if( tr_bencDictFindInt( t, "status", &i ) ) { - printf( " State: %s\n", torrentStatusToString( i ) ); + if( isVerifying( i ) && tr_bencDictFindStr( t, "recheckProgress", &str ) ) + snprintf( buf, sizeof( buf ), " (%.0f%% Done)", 100.0*atof(str) ); + else + *buf = '\0'; + printf( " State: %s%s\n", torrentStatusToString( i ), buf ); - if( isVerifying( i ) && - tr_bencDictFindStr( t, "recheckProgress", &str ) ) - printf( " Verified Progress: %.2f%%\n", 100.0*atof(str) ); } if( tr_bencDictFindInt( t, "sizeWhenDone", &i ) && tr_bencDictFindInt( t, "leftUntilDone", &j ) ) { strlratio( buf, 100.0*(i-j), i, sizeof( buf ) ); - printf( " Download Progress: %s%%\n", buf ); + printf( " Percent Done: %s%%\n", buf ); } if( tr_bencDictFindInt( t, "eta", &i ) ) {