Opened 8 years ago

Last modified 6 years ago

#2848 closed bug

Incorrect share ratio in torrent status — at Version 2

Reported by: ph33onix Owned by:
Priority: minor Milestone: 2.0.0
Component: Core Version: 1.3.6
Keywords: share ratio total_done all_time_download Cc:

Description (last modified by Cas)

In /deluge/core/torrent.py, the get_ratio method always uses the total_done variable even though it has an all_time_download variable available.

Wouldn't it be best to use whichever is greater between total_done and all_time_download to get the lowest (and safest) ratio?

So:

  • If the download is new then total_done and all_time_download will be about the same.
  • If the download is new but some files have already been downloaded then total_done will be used as it will be bigger than all_time_download.
  • If the download is old and we deselect some files(set to not download) and also delete them then all_time_download will be used as it will be (much) bigger than total_done. This is the main improvement.

The only problem case is if someone manually adds files to an old torrent. If the added files bump total_done over all_time_download which means behaviour is the same as before. If the added files don't bump total_done over all_time_download then all_time_download is used which is a bigger number and results in a lower ratio which is closer to the truth. So while this change doesn't fix this case it still improves it.

Is there anything I'm missing ?

Change History (2)

comment:1 Changed 8 years ago by Cas

  • Milestone changed from 1.3.x to 2.0

We can look at it for 2.0

comment:2 Changed 7 years ago by Cas

  • Description modified (diff)
Note: See TracTickets for help on using tickets.