1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 01:27:28 +00:00

(daemon) remote: clarify the % done vs. % verified a bit. Thanks to feedback from andersos

This commit is contained in:
Charles Kerr 2008-07-10 19:22:49 +00:00
parent 35d9c9b1c5
commit b36d3f6d35

View file

@ -405,18 +405,19 @@ printDetails( tr_benc * top )
printf( "TRANSFER\n" ); printf( "TRANSFER\n" );
if( tr_bencDictFindInt( t, "status", &i ) ) 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 ) && if( tr_bencDictFindInt( t, "sizeWhenDone", &i ) &&
tr_bencDictFindInt( t, "leftUntilDone", &j ) ) tr_bencDictFindInt( t, "leftUntilDone", &j ) )
{ {
strlratio( buf, 100.0*(i-j), i, sizeof( buf ) ); 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 ) ) { if( tr_bencDictFindInt( t, "eta", &i ) ) {