Changeset 3459


Ignore:
Timestamp:
Oct 18, 2007, 8:42:39 PM (14 years ago)
Author:
charles
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r3451 r3459  
    774774    }
    775775   
    776     s->ratio = s->downloadedEver ? s->uploadedEver / (float)s->downloadedEver
    777                                  : TR_RATIO_NA;
     776    s->ratio = ( s->downloadedEver || s->haveValid )
     777      ? s->uploadedEver / (float)(MAX(s->downloadedEver,s->haveValid))
     778      : TR_RATIO_NA;
    778779   
    779780    tr_torrentUnlock( tor );
Note: See TracChangeset for help on using the changeset viewer.