mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-18 22:36:51 +00:00
Fix #1180 properly set default options when switching a torrent label
This commit is contained in:
parent
4be615b084
commit
7d4c791241
@ -210,12 +210,23 @@ class Core(CorePluginBase):
|
|||||||
torrent.set_max_connections(options["max_connections"])
|
torrent.set_max_connections(options["max_connections"])
|
||||||
torrent.set_max_upload_slots(options["max_upload_slots"])
|
torrent.set_max_upload_slots(options["max_upload_slots"])
|
||||||
torrent.set_prioritize_first_last(options["prioritize_first_last"])
|
torrent.set_prioritize_first_last(options["prioritize_first_last"])
|
||||||
|
else:
|
||||||
|
torrent.set_max_download_speed(-1)
|
||||||
|
torrent.set_max_upload_speed(-1)
|
||||||
|
torrent.set_max_connections(-1)
|
||||||
|
torrent.set_max_upload_slots(-1)
|
||||||
|
torrent.set_prioritize_first_last(False)
|
||||||
|
|
||||||
if options["apply_queue"]:
|
if options["apply_queue"]:
|
||||||
torrent.set_auto_managed(options['is_auto_managed'])
|
torrent.set_auto_managed(options['is_auto_managed'])
|
||||||
torrent.set_stop_at_ratio(options['stop_at_ratio'])
|
torrent.set_stop_at_ratio(options['stop_at_ratio'])
|
||||||
torrent.set_stop_ratio(options['stop_ratio'])
|
torrent.set_stop_ratio(options['stop_ratio'])
|
||||||
torrent.set_remove_at_ratio(options['remove_at_ratio'])
|
torrent.set_remove_at_ratio(options['remove_at_ratio'])
|
||||||
|
else:
|
||||||
|
torrent.set_auto_managed(True)
|
||||||
|
torrent.set_stop_at_ratio(False)
|
||||||
|
torrent.set_stop_ratio(False)
|
||||||
|
torrent.set_remove_at_ratio(False)
|
||||||
|
|
||||||
if options["apply_move_completed"]:
|
if options["apply_move_completed"]:
|
||||||
torrent.set_options(
|
torrent.set_options(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user