mirror of
https://github.com/transmission/transmission
synced 2025-03-10 06:02:57 +00:00
Predicted time now shows days.
This commit is contained in:
parent
23965844d9
commit
d0ed41c842
1 changed files with 9 additions and 14 deletions
|
@ -182,23 +182,18 @@
|
|||
[self totalPeers] == 1 ? "" : "s"];
|
||||
|
||||
int eta = [self eta];
|
||||
if( eta > 99 * 3600 + 59 * 60 + 59 )
|
||||
{
|
||||
eta = -1;
|
||||
}
|
||||
if (eta < 0)
|
||||
[fProgressString appendString: @" - remaining time unknown"];
|
||||
else
|
||||
{
|
||||
if (eta < 60)
|
||||
else if (eta < 60)
|
||||
[fProgressString appendFormat: @" - %d sec remaining", eta];
|
||||
else if (eta < 3600)
|
||||
[fProgressString appendFormat: @" - %d min %02d sec remaining",
|
||||
eta / 60, eta % 60];
|
||||
else if (eta < 3600) //60 * 60
|
||||
[fProgressString appendFormat: @" - %d min %02d sec remaining", eta / 60, eta % 60];
|
||||
else if (eta < 86400) //24 * 60 * 60
|
||||
[fProgressString appendFormat: @" - %d hr %02d min remaining", eta / 3600, (eta / 60) % 60];
|
||||
else
|
||||
[fProgressString appendFormat: @" - %d hr %02d min remaining",
|
||||
eta / 3600, (eta / 60) % 60];
|
||||
}
|
||||
[fProgressString appendFormat: @" - %d day%s %d hr remaining",
|
||||
eta / 86400, eta / 86400 == 1 ? "" : "s", (eta / 3600) % 24];
|
||||
|
||||
break;
|
||||
|
||||
case TR_STATUS_SEED:
|
||||
|
|
Loading…
Add table
Reference in a new issue