mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
bah, futz with the remote strings a little more.
This commit is contained in:
parent
201302d7c5
commit
0f6499b3c7
1 changed files with 9 additions and 4 deletions
|
@ -243,7 +243,7 @@ static const char * details_keys[] = {
|
|||
"peersConnected", "peersGettingFromUs", "peersSendingToUs",
|
||||
"pieceCount", "pieceSize", "rateDownload",
|
||||
"rateUpload", "recheckProgress",
|
||||
"scrapeResponse", "seeders", "sizeWhenDone",
|
||||
"scrapeResponse", "seeders",
|
||||
"sizeWhenDone", "startDate",
|
||||
"status", "timesCompleted", "totalSize",
|
||||
"uploadedEver",
|
||||
|
@ -652,11 +652,16 @@ getStatusString( tr_benc * t, char * buf, size_t buflen )
|
|||
tr_bencDictFindInt( t, "peersSendingToUs", &toUs );
|
||||
if( fromUs && toUs )
|
||||
tr_strlcpy( buf, "Up & Down", buflen );
|
||||
else if( fromUs )
|
||||
tr_strlcpy( buf, "Seeding", buflen );
|
||||
else if( toUs )
|
||||
tr_strlcpy( buf, "Downloading", buflen );
|
||||
else
|
||||
else if( fromUs ) {
|
||||
int64_t leftUntilDone = 0;
|
||||
tr_bencDictFindInt( t, "leftUntilDone", &leftUntilDone );
|
||||
if( leftUntilDone > 0 )
|
||||
tr_strlcpy( buf, "Uploading", buflen );
|
||||
else
|
||||
tr_strlcpy( buf, "Seeding", buflen );
|
||||
} else
|
||||
tr_strlcpy( buf, "Idle", buflen );
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue