Sequential downloads. Was querying for the wrong key on the torrent status. Fixed.

This commit is contained in:
Pedro Algarvio 2011-05-08 23:46:55 +01:00
parent 3b676eca40
commit 77fc53afc0
3 changed files with 6 additions and 5 deletions

View File

@ -33,6 +33,7 @@
* Host entries in the Connection Manager UI are now editable. They're * Host entries in the Connection Manager UI are now editable. They're
now also migrated from the old format were automatic localhost logins were now also migrated from the old format were automatic localhost logins were
possible, which no longer is, this fixes #1814. possible, which no longer is, this fixes #1814.
* Implemented sequential downloads UI handling.
==== WebUI ==== ==== WebUI ====
* Migrate to ExtJS 3.1 * Migrate to ExtJS 3.1

View File

@ -116,7 +116,7 @@ class OptionsTab(Tab):
"stop_at_ratio", "stop_at_ratio",
"stop_ratio", "stop_ratio",
"remove_at_ratio", "remove_at_ratio",
"compact_allocation", "compact",
"sequential_download", "sequential_download",
"move_on_completed", "move_on_completed",
"move_on_completed_path", "move_on_completed_path",
@ -167,7 +167,7 @@ class OptionsTab(Tab):
if status["shared"] != self.prev_status["shared"]: if status["shared"] != self.prev_status["shared"]:
self.chk_shared.set_active(status["shared"]) self.chk_shared.set_active(status["shared"])
if status["compact_allocation"]: if status["compact"]:
self.chk_prioritize_first_last.set_sensitive(False) self.chk_prioritize_first_last.set_sensitive(False)
self.chk_prioritize_first_last.hide() self.chk_prioritize_first_last.hide()
self.chk_sequential_download.set_sensitive(False) self.chk_sequential_download.set_sensitive(False)
@ -203,13 +203,13 @@ class OptionsTab(Tab):
) )
if self.chk_prioritize_first_last.get_active() != \ if self.chk_prioritize_first_last.get_active() != \
self.prev_status["prioritize_first_last"] and \ self.prev_status["prioritize_first_last"] and \
not self.prev_status["compact_allocation"]: not self.prev_status["compact"]:
client.core.set_torrent_prioritize_first_last( client.core.set_torrent_prioritize_first_last(
self.prev_torrent_id, self.chk_prioritize_first_last.get_active() self.prev_torrent_id, self.chk_prioritize_first_last.get_active()
) )
if self.chk_sequential_download.get_active() != \ if self.chk_sequential_download.get_active() != \
self.prev_status["sequential_download"] and \ self.prev_status["sequential_download"] and \
not self.prev_status["compact_allocation"]: not self.prev_status["compact"]:
client.core.set_torrent_sequential_download( client.core.set_torrent_sequential_download(
self.prev_torrent_id, self.chk_prioritize_first_last.get_active() self.prev_torrent_id, self.chk_prioritize_first_last.get_active()
) )