Skip to content

Commit

Permalink
Some more tweaking of seed ratio progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin committed Jul 20, 2014
1 parent 190b1ba commit 32b82fe
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions transmission-remote-cli
Expand Up @@ -1920,11 +1920,13 @@ class Interface:


def draw_torrentlist_title(self, torrent, focused, width, ypos):
limit = torrent['seedRatioLimit'] if torrent['seedRatioMode'] == 1 else self.stats['seedRatioLimit']
if (torrent['status'] == Transmission.STATUS_SEED
and (self.stats['seedRatioLimited'] or torrent['seedRatioMode'] == 1)
and limit > 0):
percentDone = (torrent['uploadRatio'] * 100) / limit
and (self.stats['seedRatioLimited'] or torrent['seedRatioMode'] == 1)):
limit = torrent['seedRatioLimit'] if torrent['seedRatioMode'] == 1 else self.stats['seedRatioLimit']
if limit > 0:
percentDone = (torrent['uploadRatio'] * 100) / limit
else:
percentDone = 0
elif torrent['status'] == Transmission.STATUS_CHECK:
percentDone = float(torrent['recheckProgress']) * 100
else:
Expand Down

0 comments on commit 32b82fe

Please sign in to comment.