From 27f0e86afd8b1b5c76ed521926f9ccfd5a4ea559 Mon Sep 17 00:00:00 2001 From: Asmageddon Date: Mon, 12 Mar 2012 18:47:32 +0100 Subject: [PATCH] Add setting sequential_download option, set options that core.set_torrent_options doesn't support directly, remove setting 'private' torrent option as it's read-only anyway --- deluge/ui/console/modes/alltorrents.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/deluge/ui/console/modes/alltorrents.py b/deluge/ui/console/modes/alltorrents.py index a7a204a6d..cce59478d 100644 --- a/deluge/ui/console/modes/alltorrents.py +++ b/deluge/ui/console/modes/alltorrents.py @@ -207,8 +207,8 @@ torrent_options = [ ("max_upload_speed", float), ("max_connections", int), ("max_upload_slots", int), - ("private", bool), ("prioritize_first_last", bool), + ("sequential_download", bool), ("is_auto_managed", bool), ("stop_at_ratio", bool), ("stop_ratio", float), @@ -222,8 +222,8 @@ torrent_options_to_names = { "max_upload_speed": "Max UL speed", "max_connections": "Max connections", "max_upload_slots": "Max upload slots", - "private": "Private", "prioritize_first_last": "Prioritize first/last pieces", + "sequential_download": "Sequential download", "is_auto_managed": "Is auto managed?", "stop_at_ratio": "Stop at ratio", "stop_ratio": "Seeding ratio limit", @@ -660,6 +660,15 @@ class AllTorrents(BaseMode, component.Component): if result[opt] not in ["multiple", None]: options[opt] = result[opt] client.core.set_torrent_options( ids, options ) + for tid in ids: + if "move_on_completed_path" in options: + client.core.set_torrent_move_completed_path(tid, options["move_on_completed_path"]) + if "is_auto_managed" in options: + client.core.set_torrent_auto_managed(tid, options["is_auto_managed"]) + if "remove_at_ratio" in options: + client.core.set_torrent_remove_at_ratio(tid, options["remove_at_ratio"]) + if "prioritize_first_last" in options: + client.core.set_torrent_prioritize_first_last(tid, options["prioritize_first_last"]) def report_message(self,title,message): self.messages.append((title,message))