Changeset 9404
- Timestamp:
- Oct 25, 2009, 6:49:20 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/torrent.c
r9403 r9404 1024 1024 break; 1025 1025 } 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 else 1032 s->percentRatio = s->ratio / seedRatio; 1026 1033 1027 1034 tr_torrentUnlock( tor ); -
trunk/libtransmission/transmission.h
r9403 r9404 1629 1629 float percentDone; 1630 1630 1631 /** The percentage of the actual ratio to the seed ratio. This will be 1632 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 1631 1636 /** Speed all data being sent for this torrent. (KiB/s) 1632 1637 This includes piece data, protocol messages, and TCP overhead */ -
trunk/macosx/Torrent.m
r9403 r9404 344 344 - (CGFloat) progressStopRatio 345 345 { 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; 346 return fStat->percentRatio; 353 347 } 354 348
Note: See TracChangeset
for help on using the changeset viewer.