use peersConnected instead of peersTotal

This commit is contained in:
Mitchell Livingston 2007-07-15 17:25:06 +00:00
parent 73ca83a455
commit 42bcba5853
3 changed files with 10 additions and 10 deletions

View File

@ -403,7 +403,7 @@
if (active)
{
int total = [torrent totalPeers];
int total = [torrent totalPeersConnected];
NSString * connected = [NSString stringWithFormat:
NSLocalizedString(@"%d Connected", "Inspector -> Peers tab -> peers"), total];

View File

@ -177,7 +177,7 @@
- (int) leechers;
- (int) completedFromTracker;
- (int) totalPeers;
- (int) totalPeersConnected;
- (int) totalPeersTracker;
- (int) totalPeersIncoming;
- (int) totalPeersCache;

View File

@ -379,9 +379,9 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
case TR_STATUS_DOWNLOAD:
[statusString setString: @""];
if ([self totalPeers] != 1)
if ([self totalPeersConnected] != 1)
[statusString appendFormat: NSLocalizedString(@"Downloading from %d of %d peers",
"Torrent -> status string"), [self peersUploading], [self totalPeers]];
"Torrent -> status string"), [self peersUploading], [self totalPeersConnected]];
else
[statusString appendFormat: NSLocalizedString(@"Downloading from %d of 1 peer",
"Torrent -> status string"), [self peersUploading]];
@ -422,9 +422,9 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
case TR_STATUS_SEED:
case TR_STATUS_DONE:
[statusString setString: @""];
if ([self totalPeers] != 1)
if ([self totalPeersConnected] != 1)
[statusString appendFormat: NSLocalizedString(@"Seeding to %d of %d peers", "Torrent -> status string"),
[self peersDownloading], [self totalPeers]];
[self peersDownloading], [self totalPeersConnected]];
else
[statusString appendFormat: NSLocalizedString(@"Seeding to %d of 1 peer", "Torrent -> status string"),
[self peersDownloading]];
@ -1180,9 +1180,9 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
return fStat->completedFromTracker;
}
- (int) totalPeers
- (int) totalPeersConnected
{
return fStat->peersTotal;
return fStat->peersConnected;
}
- (int) totalPeersTracker
@ -1779,7 +1779,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
//determine percentage finished and available
int have = rintf((float)MAX_PIECES * [self progress]), avail;
if ([self progress] >= 1.0 || ![self isActive] || [self totalPeers] <= 0)
if ([self progress] >= 1.0 || ![self isActive] || [self totalPeersConnected] <= 0)
avail = 0;
else
{