Fix queue order on state load.

This commit is contained in:
Andrew Resch 2008-01-28 06:41:13 +00:00
parent 67dfd74bdc
commit 8604de25d8

View File

@ -301,6 +301,13 @@ class Manager:
except:
pass
# Make sure the Queue is in the correct order and remove any
# entries that were not added to the session due to error.
self.state.queue = state.queue[:]
for uid in state.queue:
if uid not in self.state.torrents:
self.state.queue.remove(uid)
# Sync with the core: tell core about torrents, and get
# unique_IDs
self.sync()