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.
This commit is contained in:
Calum Lind 2012-01-18 23:15:27 +00:00
parent e91458662f
commit 98dcc8e3b1

View file

@ -316,7 +316,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"] != 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"])