when seeding, instead of giving the the ratio as N/A, give uploaded/torrent_size (Waldorf_)

This commit is contained in:
Charles Kerr 2007-10-18 20:42:39 +00:00
parent 78b5c81253
commit 6a3a61716b
1 changed files with 3 additions and 2 deletions

View File

@ -773,8 +773,9 @@ tr_torrentStat( tr_torrent * tor )
tr_bitfieldFree( available );
}
s->ratio = s->downloadedEver ? s->uploadedEver / (float)s->downloadedEver
: TR_RATIO_NA;
s->ratio = ( s->downloadedEver || s->haveValid )
? s->uploadedEver / (float)(MAX(s->downloadedEver,s->haveValid))
: TR_RATIO_NA;
tr_torrentUnlock( tor );