Seeding ratio calculation

Bug #320378 reported by s-kon
2
Affects Status Importance Assigned to Milestone
qBittorrent
Fix Released
Low
Christophe Dumez

Bug Description

The situation: I add a torrent which I never downloaded in qbittorrent and I want to seed it.
1. The torrent adds. Checks itself => 100%. And it moves to the "Finished" tab.
2. The ratio of this torrent is set to 1.0. I suppose it is wrong, because i did not even start seeding. So the starting ration should be 0.0 or it should be calculated of the whole size of torrent not of downloaded megabytes.
3. When seeding begins - the ratio skips to 10.0 - this is really wrong. It should be calculated as [Uploaded]/[Size of torrent]
4. As i see 10.0 is the max ratio which is reachable in qbittorrent. This is wrong. I have a lot of torrents in "other clients" which share ratios are up to 20.

So. this is it.
Thank you.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

ratio = [Uploaded]/[Size of torrent] ?

What are your sources? I rechecked on the web, just to be sure and it seems that other main torrent clients use:
ratio = [Uploaded / Downloaded]

I do agree that I should not limit to 10 and I will fix this in v1.3.1.

According to my sources (utorrent for example), if you add a complete torrent to the list, its ratio should be "infinity". I will also fix this.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I made the following fixes:
- Max ratio is 100
- If download amount is 0, then share ratio is "infinity" instead of max ratio (used to be 10)

Regarding your proposal for share ratio calculation, I did proceed with the change. Indeed, most sources I found use the same algorithm as me. If a tracker does not report the same share ratio as the torrent client, this could be confusing. Therefore, I must do the same as others.

Thanks for your report.

Changed in qbittorrent:
assignee: nobody → hydr0g3n
importance: Undecided → Low
milestone: none → 1.3.1
status: New → Fix Committed
Changed in qbittorrent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.