Changeset 9403
- Timestamp:
- Oct 25, 2009, 6:45:35 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/torrent.c
r9397 r9403 1025 1025 } 1026 1026 1027 if( !checkSeedRatio || s->ratio >= seedRatio || s->ratio == TR_RATIO_INF )1028 s->percentRatio = 1.0;1029 else if( s->ratio == TR_RATIO_NA )1030 s->percentRatio = 0.0;1031 else1032 s->percentRatio = s->ratio / seedRatio;1033 1034 1027 tr_torrentUnlock( tor ); 1035 1028 -
trunk/libtransmission/transmission.h
r9387 r9403 1629 1629 float percentDone; 1630 1630 1631 /** The percentage of the actual ratio to the seed ratio. This will be1632 equal to 1 if the ratio is reached or the torrent is set to seed forever.1633 Range is [0..1] */1634 float percentRatio;1635 1636 1631 /** Speed all data being sent for this torrent. (KiB/s) 1637 1632 This includes piece data, protocol messages, and TCP overhead */ -
trunk/macosx/Torrent.m
r9402 r9403 344 344 - (CGFloat) progressStopRatio 345 345 { 346 return fStat->percentRatio; 346 double seedRatio; 347 if (!tr_torrentGetSeedRatio(fHandle, seedRatio) || [self ratio] >= seedRatio || [self ratio] == TR_RATIO_INF) 348 return 1.0; 349 else if ([self ratio] == TR_RATIO_NA) 350 return 0.0; 351 else 352 return [self ratio] / seedRatio; 347 353 } 348 354
Note: See TracChangeset
for help on using the changeset viewer.