1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

bah, futz with the remote strings a little more.

This commit is contained in:
Charles Kerr 2008-11-01 14:59:49 +00:00
parent 201302d7c5
commit 0f6499b3c7

View file

@ -243,7 +243,7 @@ static const char * details_keys[] = {
"peersConnected", "peersGettingFromUs", "peersSendingToUs", "peersConnected", "peersGettingFromUs", "peersSendingToUs",
"pieceCount", "pieceSize", "rateDownload", "pieceCount", "pieceSize", "rateDownload",
"rateUpload", "recheckProgress", "rateUpload", "recheckProgress",
"scrapeResponse", "seeders", "sizeWhenDone", "scrapeResponse", "seeders",
"sizeWhenDone", "startDate", "sizeWhenDone", "startDate",
"status", "timesCompleted", "totalSize", "status", "timesCompleted", "totalSize",
"uploadedEver", "uploadedEver",
@ -652,11 +652,16 @@ getStatusString( tr_benc * t, char * buf, size_t buflen )
tr_bencDictFindInt( t, "peersSendingToUs", &toUs ); tr_bencDictFindInt( t, "peersSendingToUs", &toUs );
if( fromUs && toUs ) if( fromUs && toUs )
tr_strlcpy( buf, "Up & Down", buflen ); tr_strlcpy( buf, "Up & Down", buflen );
else if( fromUs )
tr_strlcpy( buf, "Seeding", buflen );
else if( toUs ) else if( toUs )
tr_strlcpy( buf, "Downloading", buflen ); 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 ); tr_strlcpy( buf, "Idle", buflen );
break; break;
} }