(trunk daemon) #3284 "show bandwidth priorities in transmission-remote" -- added

This commit is contained in:
Charles Kerr 2010-06-26 20:48:52 +00:00
parent 0bfc4b0207
commit 24a7cb5dd9
1 changed files with 9 additions and 1 deletions

View File

@ -587,6 +587,7 @@ static const char * files_keys[] = {
static const char * details_keys[] = {
"activityDate",
"addedDate",
"bandwidthPriority",
"comment",
"corruptEver",
"creator",
@ -749,6 +750,9 @@ getStatusString( tr_benc * t, char * buf, size_t buflen )
return buf;
}
static const char *bandwidthPriorityNames[] =
{ "Low", "Normal", "High", "Invalid" };
static void
printDetails( tr_benc * top )
{
@ -1067,7 +1071,7 @@ printDetails( tr_benc * top )
printf( " Piece Size: %" PRId64 "\n", i );
printf( "\n" );
printf( "LIMITS\n" );
printf( "LIMITS & BANDWIDTH\n" );
if( tr_bencDictFindBool( t, "downloadLimited", &boolVal )
&& tr_bencDictFindInt( t, "downloadLimit", &i ) )
{
@ -1090,6 +1094,10 @@ printDetails( tr_benc * top )
printf( " Honors Session Limits: %s\n", ( boolVal ? "Yes" : "No" ) );
if( tr_bencDictFindInt ( t, "peer-limit", &i ) )
printf( " Peer limit: %" PRId64 "\n", i );
if (tr_bencDictFindInt (t, "bandwidthPriority", &i))
printf (" Bandwidth Priority: %s\n",
bandwidthPriorityNames[(i + 1) & 3]);
printf( "\n" );
printf( "PIECES\n" );