summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2012-01-18 23:15:27 +0000
committerCalum Lind <calumlind+deluge@gmail.com>2012-01-19 01:33:16 +0000
commitf4fab8676701f5cca968b57d708e971b07e4ffc6 (patch)
tree0f6ab40815fe4262bcdfd3d1c52ad27bfa099343
parent517addb9f93a5898bde3ea53986b4fa1ba59cbf6 (diff)
downloaddeluge-f4fab8676701f5cca968b57d708e971b07e4ffc6.tar.gz
deluge-f4fab8676701f5cca968b57d708e971b07e4ffc6.tar.bz2
deluge-f4fab8676701f5cca968b57d708e971b07e4ffc6.zip
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.
-rw-r--r--deluge/core/torrent.py4
1 files changed, 3 insertions, 1 deletions
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"])