Fix advanced progressbar to display properly when torrent only has 1
wanted piece that is smaller than the piece size
This commit is contained in:
parent
4ae8faa3ef
commit
069bd5da88
|
@ -93,6 +93,9 @@ class DetailsTabManager(object):
|
|||
if state != None:
|
||||
gc.set_foreground(colormap.alloc_color('#2020FF'))
|
||||
progress_window.draw_rectangle(gc, True, 0, top, int(size[0] * state['progress']), 4)
|
||||
if state["total_wanted"] < state["piece_length"] and state["total_wanted"] > 0:
|
||||
num_pieces = 1
|
||||
else:
|
||||
num_pieces = state["total_wanted"] / state["piece_length"]
|
||||
if num_pieces > 0:
|
||||
for pieces_range in state['pieces']:
|
||||
|
|
Loading…
Reference in New Issue