Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Convert rtorrent IEC units to SI #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions utils/rtorrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_download_rate(self):
total_rate = proxy.throttle.global_down.rate()
except Exception:
pass
return "%sps" % misc.bytes_to_string(total_rate).replace('B', 'b')
return "%sps" % misc.bytes_to_string(total_rate * 8.38861).replace('B', 'b')

def get_upload_rate(self):
total_rate = 0
Expand All @@ -41,7 +41,7 @@ def get_upload_rate(self):
total_rate = proxy.throttle.global_up.rate()
except Exception:
pass
return "%sps" % misc.bytes_to_string(total_rate).replace('B', 'b')
return "%sps" % misc.bytes_to_string(total_rate * 8.38861).replace('B', 'b')

def get_torrent_counts(self):
total_seeding = 0
Expand Down