diff options
author | Andrew Resch <andrewresch@gmail.com> | 2008-10-08 12:42:59 +0000 |
---|---|---|
committer | Andrew Resch <andrewresch@gmail.com> | 2008-10-08 12:42:59 +0000 |
commit | acd64e6381a43a8bcc0477279d453ea2a352f902 (patch) | |
tree | 0ae5dfa3745724425c510e098d4180d0465fe53f | |
parent | 70c588dba65c2ae46eb56c395427b886f78684ee (diff) | |
download | deluge-acd64e6381a43a8bcc0477279d453ea2a352f902.tar.gz deluge-acd64e6381a43a8bcc0477279d453ea2a352f902.tar.bz2 deluge-acd64e6381a43a8bcc0477279d453ea2a352f902.zip |
Prevent being able to set file priorities for compactly allocated
torrents as it is not intended to work.
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | deluge/core/torrent.py | 11 |
2 files changed, 11 insertions, 2 deletions
@@ -8,6 +8,8 @@ Deluge 1.0.1 (In Development) * Removed the 'Maximum Connections Per Second' setting and replaced it with a default setting of 20. This should alleviate speed issues some are experiencing. * Changed max half-open connections default limit to 8 on XP/2000 and 4 on Vista + * Prevent being able to set file priorities for compactly allocated torrents as + it is not intended to work. GtkUI: * Improve performance of files tab by only updating when values change diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 57dce0fad..a806f4e18 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -184,11 +184,18 @@ class Torrent: self.remove_at_ratio = remove_at_ratio def set_file_priorities(self, file_priorities): - log.debug("setting %s's file priorities: %s", self.torrent_id, file_priorities) if len(file_priorities) != len(self.files): log.debug("file_priorities len != num_files") + self.options["file_priorities"] = self.handle.file_priorities() return - + + if self.options["compact_allocation"]: + log.debug("setting file priority with compact allocation does not work!") + self.options["file_priorities"] = self.handle.file_priorities() + return + + log.debug("setting %s's file priorities: %s", self.torrent_id, file_priorities) + self.handle.prioritize_files(file_priorities) if 0 in self.file_priorities: |