(daemon) #1078: possible fix... reuse the -l's "state" code for -i

This commit is contained in:
Charles Kerr 2008-07-10 17:07:12 +00:00
parent 1b8435aa02
commit e7d0da55c4
1 changed files with 2 additions and 11 deletions

View File

@ -396,17 +396,8 @@ printDetails( tr_benc * top )
printf( "\n" ); printf( "\n" );
printf( "TRANSFER\n" ); printf( "TRANSFER\n" );
if( tr_bencDictFindInt( t, "status", &i ) ) { if( tr_bencDictFindInt( t, "status", &i ) )
switch( i ) { printf( " State: %s\n", torrentStatusToString( i ) );
case TR_STATUS_SEED: str = "Seeding"; break;
case TR_STATUS_DOWNLOAD: str = "Downloading"; break;
case TR_STATUS_STOPPED: str = "Paused"; break;
case TR_STATUS_CHECK: str = "Verifying local data"; break;
case TR_STATUS_CHECK_WAIT: str = "Waiting to verify"; break;
default: str = "error"; break;
}
printf( " State: %s\n", str );
}
if( tr_bencDictFindInt( t, "eta", &i ) ) { if( tr_bencDictFindInt( t, "eta", &i ) ) {
etaToString( buf, sizeof( buf ), i ); etaToString( buf, sizeof( buf ), i );
printf( " ETA: %s\n", buf ); printf( " ETA: %s\n", buf );