From 77fc53afc0933a31ff2eff564c8767497c7f8946 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sun, 8 May 2011 23:46:55 +0100 Subject: [PATCH] Sequential downloads. Was querying for the wrong key on the torrent status. Fixed. --- ChangeLog | 1 + deluge/ui/gtkui/options_tab.py | 8 ++++---- deluge/ui/sessionproxy.py | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 46956e581..8a5f3f9b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,6 +33,7 @@ * Host entries in the Connection Manager UI are now editable. They're now also migrated from the old format were automatic localhost logins were possible, which no longer is, this fixes #1814. + * Implemented sequential downloads UI handling. ==== WebUI ==== * Migrate to ExtJS 3.1 diff --git a/deluge/ui/gtkui/options_tab.py b/deluge/ui/gtkui/options_tab.py index c5fc4c7d5..7d61870cf 100644 --- a/deluge/ui/gtkui/options_tab.py +++ b/deluge/ui/gtkui/options_tab.py @@ -116,7 +116,7 @@ class OptionsTab(Tab): "stop_at_ratio", "stop_ratio", "remove_at_ratio", - "compact_allocation", + "compact", "sequential_download", "move_on_completed", "move_on_completed_path", @@ -167,7 +167,7 @@ class OptionsTab(Tab): if status["shared"] != self.prev_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.hide() self.chk_sequential_download.set_sensitive(False) @@ -203,13 +203,13 @@ class OptionsTab(Tab): ) if self.chk_prioritize_first_last.get_active() != \ 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( self.prev_torrent_id, self.chk_prioritize_first_last.get_active() ) if self.chk_sequential_download.get_active() != \ self.prev_status["sequential_download"] and \ - not self.prev_status["compact_allocation"]: + not self.prev_status["compact"]: client.core.set_torrent_sequential_download( self.prev_torrent_id, self.chk_prioritize_first_last.get_active() ) diff --git a/deluge/ui/sessionproxy.py b/deluge/ui/sessionproxy.py index f14a05a7c..5e33a629f 100644 --- a/deluge/ui/sessionproxy.py +++ b/deluge/ui/sessionproxy.py @@ -135,7 +135,7 @@ class SessionProxy(component.Component): keys_to_get.append(key) if not keys_to_get: - return succeed(self.create_status_dict([torrent_id], keys)[torrent_id]) + return succeed(self.create_status_dict([torrent_id], keys)[torrent_id]) else: d = client.core.get_torrent_status(torrent_id, keys_to_get, True) def on_status(result, torrent_id):