From f4fab8676701f5cca968b57d708e971b07e4ffc6 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Wed, 18 Jan 2012 23:15:27 +0000 Subject: Fix stored file priorities settings File priorities stored in torrent options were based upon the supplied funtion values rather than the current values stored in libtorrent. So if the priorities failed to be set by libtorrent the settings would be out of sync. --- deluge/core/torrent.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 972ffc6ba..68e09a86f 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -375,7 +375,9 @@ class Torrent(object): self.update_state() break - self.options["file_priorities"] = file_priorities + self.options["file_priorities"] = self.handle.file_priorities() + if self.options["file_priorities"] != list(file_priorities): + log.warning("File priorities were not set for this torrent") # Set the first/last priorities if needed self.set_prioritize_first_last(self.options["prioritize_first_last_pieces"]) -- cgit