Changeset 1767 for trunk/libtransmission/torrent.c
- Timestamp:
- Apr 20, 2007, 11:51:15 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/torrent.c
r1766 r1767 462 462 if( s->downloaded == 0 ) 463 463 { 464 //if s eeding without ever downloading, calculate ratio from total size465 if( s->progress > = 1.0 )466 { 467 s->ratio = (float)s->uploaded / ( float)inf->totalSize;464 //if some is downloaded without a downloaded value, calculate ratio from total size 465 if( s->progress > 0.0 ) 466 { 467 s->ratio = (float)s->uploaded / ((float)inf->totalSize * s->progress); 468 468 } 469 469 else 470 470 { 471 s->ratio = s->uploaded == 0 ? TR_RATIO_NA : TR_RATIO_INF;471 s->ratio = TR_RATIO_NA; 472 472 } 473 473 }
Note: See TracChangeset
for help on using the changeset viewer.