mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
if seeding without ever downloading with T, calculate ratio by using the file size as amount downloaded
This commit is contained in:
@@ -461,7 +461,15 @@ tr_stat_t * tr_torrentStat( tr_torrent_t * tor )
|
||||
|
||||
if( s->downloaded == 0 )
|
||||
{
|
||||
s->ratio = s->uploaded == 0 ? TR_RATIO_NA : TR_RATIO_INF;
|
||||
//if seeding without ever downloading, calculate ratio from total size
|
||||
if( s->progress >= 1.0 )
|
||||
{
|
||||
s->ratio = (float)s->uploaded / (float)inf->totalSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
s->ratio = s->uploaded == 0 ? TR_RATIO_NA : TR_RATIO_INF;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user