cleanup file tab progress code
This commit is contained in:
parent
623c1c8dfc
commit
8faf6d624a
|
@ -1086,13 +1086,9 @@ class DelugeGTK:
|
||||||
|
|
||||||
|
|
||||||
elif tab == 2: #file tab
|
elif tab == 2: #file tab
|
||||||
unique_id = self.get_selected_torrent()
|
for file in self.manager.get_torrent_file_info(self.get_selected_torrent()):
|
||||||
new_file_info = self.manager.get_torrent_file_info(unique_id)
|
if self.file_get_iter_from_name(file['path']) != None:
|
||||||
for file in new_file_info:
|
self.file_store.set_value(self.file_get_iter_from_name(file['path']), 3, round(file['progress'], 2))
|
||||||
iter = self.file_get_iter_from_name(file['path'])
|
|
||||||
if iter != None and \
|
|
||||||
round(self.file_store.get_value(iter, 3), 2) != round(file['progress'], 2):
|
|
||||||
self.file_store.set_value(iter, 3, round(file['progress'], 2))
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue