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:
parent
517addb9f9
commit
f4fab86767
|
@ -375,7 +375,9 @@ class Torrent(object):
|
||||||
self.update_state()
|
self.update_state()
|
||||||
break
|
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
|
# Set the first/last priorities if needed
|
||||||
self.set_prioritize_first_last(self.options["prioritize_first_last_pieces"])
|
self.set_prioritize_first_last(self.options["prioritize_first_last_pieces"])
|
||||||
|
|
Loading…
Reference in New Issue