(libT) if there are webseeds, update the available amount accordingly
This commit is contained in:
parent
ef3203a765
commit
9f2d7c2c67
|
@ -691,7 +691,7 @@ tr_torrentStat( tr_torrent * tor )
|
|||
tr_stat * s;
|
||||
struct tr_tracker * tc;
|
||||
const tr_tracker_info * ti;
|
||||
int seedsConnected = 0;
|
||||
int usableSeeds = 0;
|
||||
|
||||
if( !tor )
|
||||
return NULL;
|
||||
|
@ -719,11 +719,13 @@ tr_torrentStat( tr_torrent * tor )
|
|||
tor->info.hash,
|
||||
&s->peersKnown,
|
||||
&s->peersConnected,
|
||||
&seedsConnected,
|
||||
&usableSeeds,
|
||||
&s->peersSendingToUs,
|
||||
&s->peersGettingFromUs,
|
||||
s->peersFrom );
|
||||
|
||||
usableSeeds += tor->info.webseedCount;
|
||||
|
||||
s->percentComplete = tr_cpPercentComplete ( tor->completion );
|
||||
|
||||
s->percentDone = tr_cpPercentDone( tor->completion );
|
||||
|
@ -749,7 +751,7 @@ tr_torrentStat( tr_torrent * tor )
|
|||
s->haveUnchecked = tr_cpHaveTotal( tor->completion ) - s->haveValid;
|
||||
|
||||
|
||||
if( seedsConnected > 0 )
|
||||
if( usableSeeds > 0 )
|
||||
{
|
||||
s->desiredAvailable = s->leftUntilDone;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue