use peersConnected instead of peersTotal
This commit is contained in:
parent
73ca83a455
commit
42bcba5853
|
@ -403,7 +403,7 @@
|
||||||
|
|
||||||
if (active)
|
if (active)
|
||||||
{
|
{
|
||||||
int total = [torrent totalPeers];
|
int total = [torrent totalPeersConnected];
|
||||||
NSString * connected = [NSString stringWithFormat:
|
NSString * connected = [NSString stringWithFormat:
|
||||||
NSLocalizedString(@"%d Connected", "Inspector -> Peers tab -> peers"), total];
|
NSLocalizedString(@"%d Connected", "Inspector -> Peers tab -> peers"), total];
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,7 @@
|
||||||
- (int) leechers;
|
- (int) leechers;
|
||||||
- (int) completedFromTracker;
|
- (int) completedFromTracker;
|
||||||
|
|
||||||
- (int) totalPeers;
|
- (int) totalPeersConnected;
|
||||||
- (int) totalPeersTracker;
|
- (int) totalPeersTracker;
|
||||||
- (int) totalPeersIncoming;
|
- (int) totalPeersIncoming;
|
||||||
- (int) totalPeersCache;
|
- (int) totalPeersCache;
|
||||||
|
|
|
@ -379,9 +379,9 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||||
|
|
||||||
case TR_STATUS_DOWNLOAD:
|
case TR_STATUS_DOWNLOAD:
|
||||||
[statusString setString: @""];
|
[statusString setString: @""];
|
||||||
if ([self totalPeers] != 1)
|
if ([self totalPeersConnected] != 1)
|
||||||
[statusString appendFormat: NSLocalizedString(@"Downloading from %d of %d peers",
|
[statusString appendFormat: NSLocalizedString(@"Downloading from %d of %d peers",
|
||||||
"Torrent -> status string"), [self peersUploading], [self totalPeers]];
|
"Torrent -> status string"), [self peersUploading], [self totalPeersConnected]];
|
||||||
else
|
else
|
||||||
[statusString appendFormat: NSLocalizedString(@"Downloading from %d of 1 peer",
|
[statusString appendFormat: NSLocalizedString(@"Downloading from %d of 1 peer",
|
||||||
"Torrent -> status string"), [self peersUploading]];
|
"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_SEED:
|
||||||
case TR_STATUS_DONE:
|
case TR_STATUS_DONE:
|
||||||
[statusString setString: @""];
|
[statusString setString: @""];
|
||||||
if ([self totalPeers] != 1)
|
if ([self totalPeersConnected] != 1)
|
||||||
[statusString appendFormat: NSLocalizedString(@"Seeding to %d of %d peers", "Torrent -> status string"),
|
[statusString appendFormat: NSLocalizedString(@"Seeding to %d of %d peers", "Torrent -> status string"),
|
||||||
[self peersDownloading], [self totalPeers]];
|
[self peersDownloading], [self totalPeersConnected]];
|
||||||
else
|
else
|
||||||
[statusString appendFormat: NSLocalizedString(@"Seeding to %d of 1 peer", "Torrent -> status string"),
|
[statusString appendFormat: NSLocalizedString(@"Seeding to %d of 1 peer", "Torrent -> status string"),
|
||||||
[self peersDownloading]];
|
[self peersDownloading]];
|
||||||
|
@ -1180,9 +1180,9 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||||
return fStat->completedFromTracker;
|
return fStat->completedFromTracker;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) totalPeers
|
- (int) totalPeersConnected
|
||||||
{
|
{
|
||||||
return fStat->peersTotal;
|
return fStat->peersConnected;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) totalPeersTracker
|
- (int) totalPeersTracker
|
||||||
|
@ -1779,7 +1779,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||||
|
|
||||||
//determine percentage finished and available
|
//determine percentage finished and available
|
||||||
int have = rintf((float)MAX_PIECES * [self progress]), avail;
|
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;
|
avail = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue