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 517addb9f9
commit f4fab86767
1 changed files with 3 additions and 1 deletions

View File

@ -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"])