Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: calculate seedratio by torrent size
Fixes #276. Previously was calculated by number of bytes downloaded, which caused edge cases when those two numbers were not the same, e.g. if the user already had part of the torrent from another source and only downloaded a small part. When this happened, the ratio could be very large and use of seedratio would behave in a way that most people would not expect. Note, the old behavior has been around for a VERY LONG TIME. Even though this is a bugfix, it does change semantics. I don't think there is any third-party code that depends on the old behavior but this is arguably a breaking change.
- Loading branch information