mirror of
https://github.com/transmission/transmission
synced 2024-12-27 18:18:10 +00:00
if there is an error still display per-torrent speeds in the main window
This commit is contained in:
parent
3e87e07e0c
commit
6c962e15b1
1 changed files with 9 additions and 6 deletions
|
@ -223,7 +223,6 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
fStat = tr_torrentStat(fHandle);
|
||||
|
||||
//check to stop for ratio
|
||||
#warning fix this!
|
||||
float stopRatio;
|
||||
if ([self isSeeding] && (stopRatio = [self actualStopRatio]) != INVALID && [self ratio] >= stopRatio)
|
||||
{
|
||||
|
@ -924,9 +923,6 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
else
|
||||
string = [NSString stringWithFormat: NSLocalizedString(@"Downloading from %d of 1 peer",
|
||||
"Torrent -> status string"), [self peersSendingToUs]];
|
||||
|
||||
string = [string stringByAppendingFormat: @" - DL: %@, UL: %@",
|
||||
[NSString stringForSpeed: [self downloadRate]], [NSString stringForSpeed: [self uploadRate]]];
|
||||
break;
|
||||
|
||||
case TR_STATUS_SEED:
|
||||
|
@ -937,8 +933,6 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
else
|
||||
string = [NSString stringWithFormat: NSLocalizedString(@"Seeding to %d of 1 peer", "Torrent -> status string"),
|
||||
[self peersGettingFromUs]];
|
||||
|
||||
string = [string stringByAppendingFormat: @" - UL: %@", [NSString stringForSpeed: [self uploadRate]]];
|
||||
break;
|
||||
|
||||
case TR_STATUS_STOPPING:
|
||||
|
@ -951,6 +945,15 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
|
||||
if (fStalled)
|
||||
string = [NSLocalizedString(@"Stalled, ", "Torrent -> status string") stringByAppendingString: string];
|
||||
|
||||
if ([self isActive] && ![self isChecking])
|
||||
{
|
||||
if (fStat->status == TR_STATUS_DOWNLOAD)
|
||||
string = [string stringByAppendingFormat: @" - DL: %@, UL: %@",
|
||||
[NSString stringForSpeed: [self downloadRate]], [NSString stringForSpeed: [self uploadRate]]];
|
||||
else
|
||||
string = [string stringByAppendingFormat: @" - UL: %@", [NSString stringForSpeed: [self uploadRate]]];
|
||||
}
|
||||
}
|
||||
|
||||
return string;
|
||||
|
|
Loading…
Reference in a new issue