mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
(daemon) #1520: "transmission-remote -l" doesn't show infinite ratio properly
This commit is contained in:
parent
924b9230f8
commit
b8e9ef54fe
1 changed files with 5 additions and 4 deletions
|
@ -598,7 +598,7 @@ strlratio( char * buf,
|
|||
tr_snprintf( buf, buflen, "%'.0f", ratio );
|
||||
}
|
||||
else if( numerator )
|
||||
tr_strlcpy( buf, "Infinity", buflen );
|
||||
tr_strlcpy( buf, "Inf", buflen );
|
||||
else
|
||||
tr_strlcpy( buf, "None", buflen );
|
||||
return buf;
|
||||
|
@ -1028,20 +1028,21 @@ printTorrentList( tr_benc * top )
|
|||
{
|
||||
char etaStr[16];
|
||||
char statusStr[64];
|
||||
char ratioStr[32];
|
||||
|
||||
if( leftUntilDone )
|
||||
etaToString( etaStr, sizeof( etaStr ), eta );
|
||||
else
|
||||
tr_snprintf( etaStr, sizeof( etaStr ), "Done" );
|
||||
printf(
|
||||
"%4d %3d%% %-8s %6.1f %6.1f %5.1f %-11s %s\n",
|
||||
"%4d %3d%% %-8s %6.1f %6.1f %5s %-11s %s\n",
|
||||
(int)id,
|
||||
(int)( 100.0 *
|
||||
( sizeWhenDone - leftUntilDone ) / sizeWhenDone ),
|
||||
etaStr,
|
||||
up / 1024.0,
|
||||
down / 1024.0,
|
||||
(double)( downEver ? ( (double)upEver /
|
||||
downEver ) : 0.0 ),
|
||||
strlratio( ratioStr, downEver, upEver, sizeof( ratioStr ) ),
|
||||
getStatusString( d, statusStr, sizeof( statusStr ) ),
|
||||
name );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue