From 9135d5e061aaf15ccc9e93a49ab2ca1d17f9e78e Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sun, 12 Sep 2010 19:49:06 +0000 Subject: [PATCH] fix a display issue with the idle time for a split second after the transfer starts, since the transfer would be marked as downloading but would not yet have a start time --- libtransmission/torrent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index 1de8ebe45..b5b38a001 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -771,7 +771,7 @@ torrentInit( tr_torrent * tor, const tr_ctor * ctor ) tor->bandwidth->priority = tr_ctorGetBandwidthPriority( ctor ); tor->error = TR_STAT_OK; - + tor->finishedSeedingByIdle = FALSE; tr_peerMgrAddTorrent( session->peerMgr, tor ); @@ -1111,7 +1111,7 @@ tr_torrentStat( tr_torrent * tor ) s->doneDate = tor->doneDate; s->startDate = tor->startDate; - if (s->activity == TR_STATUS_DOWNLOAD || s->activity == TR_STATUS_SEED) + if ((s->activity == TR_STATUS_DOWNLOAD || s->activity == TR_STATUS_SEED) && s->startDate != 0) s->idleSecs = difftime(tr_time(), MAX(s->startDate, s->activityDate)); else s->idleSecs = -1; -- 2.40.0