From 2a8b6f8b1f993d7ba589251ac0aa1ba7e207a120 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Mon, 7 Apr 2008 03:01:57 +0000 Subject: [PATCH] fix marking the eta of torrents with peers as unavailable --- libtransmission/torrent.c | 2 +- macosx/Torrent.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index 0601b6ce0..fe8167191 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -659,7 +659,7 @@ tr_torrentStat( tr_torrent * tor ) tr_bitfieldFree( availablePieces ); } - if( s->desiredAvailable != s->leftUntilDone ) + if( s->desiredSize > s->desiredAvailable ) s->eta = TR_ETA_NOT_AVAIL; else if( s->rateDownload < 0.1 ) s->eta = TR_ETA_UNKNOWN; diff --git a/macosx/Torrent.m b/macosx/Torrent.m index fcbeb1452..92475bddd 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -1841,7 +1841,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void * return NSLocalizedString(@"full download not available", "Torrent -> eta string"); default: return [NSString stringWithFormat: NSLocalizedString(@"%@ remaining", "Torrent -> eta string"), - [NSString timeString: eta showSeconds: YES maxDigits: 2]]; + [NSString timeString: eta showSeconds: YES maxDigits: 2]]; } }