fix queue in force recheck

This commit is contained in:
Marcos Pinto 2007-11-06 04:09:40 +00:00
parent 5383d6d197
commit 9ac2b85068
1 changed files with 8 additions and 3 deletions

View File

@ -782,11 +782,16 @@ trying to create \"%s\"\nPlease make sure you have the write permissions and the
pass pass
torrent_state = self.manager.get_torrent_state(unique_ID) torrent_state = self.manager.get_torrent_state(unique_ID)
current_order = torrent_state['queue_pos'] current_order = torrent_state['queue_pos']
while current_order != save_info[2]:
if current_order > save_info[2]: if current_order > save_info[2]:
diff = current_order - save_info[2]
for x in range(diff):
self.manager.queue_up(unique_ID) self.manager.queue_up(unique_ID)
self.update()
else: else:
diff = save_info[2] - current_order
for x in range(diff):
self.manager.queue_down(unique_ID) self.manager.queue_down(unique_ID)
self.update()
os.remove(save_info[0]) os.remove(save_info[0])
def tor_start(self, widget): def tor_start(self, widget):