mirror of
https://github.com/transmission/transmission
synced 2024-12-23 08:13:27 +00:00
if the ratio is infinity, stop seeding if a stop ratio is set
This commit is contained in:
parent
2dabe5ce34
commit
3ffbb31774
1 changed files with 3 additions and 3 deletions
|
@ -926,9 +926,9 @@ tr_torrentStat( tr_torrent * tor )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !checkSeedRatio || s->ratio >= seedRatio || s->ratio == TR_RATIO_INF )
|
if( !checkSeedRatio || s->ratio >= seedRatio || s->ratio == TR_RATIO_INF )
|
||||||
s->percentRatio = 1.0;
|
s->percentRatio = 1.0;
|
||||||
else if ( s->ratio == TR_RATIO_NA )
|
else if( s->ratio == TR_RATIO_NA )
|
||||||
s->percentRatio = 0.0;
|
s->percentRatio = 0.0;
|
||||||
else
|
else
|
||||||
s->percentRatio = s->ratio / seedRatio;
|
s->percentRatio = s->ratio / seedRatio;
|
||||||
|
@ -2147,7 +2147,7 @@ tr_torrentCheckSeedRatio( tr_torrent * tor )
|
||||||
|
|
||||||
ratio = tr_getRatio( up, down );
|
ratio = tr_getRatio( up, down );
|
||||||
|
|
||||||
if( ratio >= seedRatio )
|
if( ratio >= seedRatio || ratio == TR_RATIO_INF )
|
||||||
{
|
{
|
||||||
tr_torrentStop( tor );
|
tr_torrentStop( tor );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue