1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-21 13:46:52 +00:00

seeding eta better matches libT's calculation

This commit is contained in:
Mitchell Livingston 2008-11-04 13:18:05 +00:00
parent 85b0495e52
commit 4ec4c07929

View file

@ -941,7 +941,9 @@ void completenessChangeCallback(tr_torrent * torrent, tr_completeness status, vo
if (stopRatio == INVALID || ratio >= stopRatio)
return TR_ETA_UNKNOWN;
return (CGFloat)MAX([self downloadedTotal], [self haveTotal]) * (stopRatio - ratio) / uploadRate / 1024.0;
CGFloat haveDownloaded = (CGFloat)([self downloadedTotal] > 0 ? [self downloadedTotal] : [self haveVerified]);
CGFloat needUploaded = haveDownloaded * (stopRatio - ratio);
return needUploaded / uploadRate / 1024.0;
}
- (CGFloat) notAvailableDesired