From 8604de25d89b877ef93dbde7b15937f06e728a84 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 28 Jan 2008 06:41:13 +0000 Subject: [PATCH] Fix queue order on state load. --- src/core.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core.py b/src/core.py index e407635d6..4ab6652f1 100644 --- a/src/core.py +++ b/src/core.py @@ -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()