From 24a7cb5dd952b65c6699536bb7de34d48f7013d8 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sat, 26 Jun 2010 20:48:52 +0000 Subject: [PATCH] (trunk daemon) #3284 "show bandwidth priorities in transmission-remote" -- added --- daemon/remote.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/daemon/remote.c b/daemon/remote.c index 2f83c5432..7c9a2e18f 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -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" ); -- 2.40.0