mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-05 16:08:40 +00:00
Fix issue with add_torrent_params flags
This commit is contained in:
parent
80e56eb190
commit
01d2ef84ba
1 changed files with 10 additions and 2 deletions
|
@ -438,10 +438,18 @@ class TorrentManager(component.Component):
|
||||||
# Fill in the rest of the add_torrent_params dictionary
|
# Fill in the rest of the add_torrent_params dictionary
|
||||||
add_torrent_params["save_path"] = utf8_encoded(options["download_location"])
|
add_torrent_params["save_path"] = utf8_encoded(options["download_location"])
|
||||||
add_torrent_params["storage_mode"] = storage_mode
|
add_torrent_params["storage_mode"] = storage_mode
|
||||||
add_torrent_params["flags"] = (lt.add_torrent_params_flags_t.flag_paused |
|
|
||||||
lt.add_torrent_params_flags_t.flag_duplicate_is_error)
|
default_flags = (lt.add_torrent_params_flags_t.flag_paused |
|
||||||
|
lt.add_torrent_params_flags_t.flag_auto_managed|
|
||||||
|
lt.add_torrent_params_flags_t.flag_update_subscribe|
|
||||||
|
lt.add_torrent_params_flags_t.flag_apply_ip_filter)
|
||||||
|
# Set flags: enable duplicate_is_error and disable auto_managed
|
||||||
|
add_torrent_params["flags"] = ((default_flags
|
||||||
|
| lt.add_torrent_params_flags_t.flag_duplicate_is_error)
|
||||||
|
^ lt.add_torrent_params_flags_t.flag_auto_managed)
|
||||||
if seed_mode:
|
if seed_mode:
|
||||||
add_torrent_params["flags"] |= lt.add_torrent_params_flags_t.flag_seed_mode
|
add_torrent_params["flags"] |= lt.add_torrent_params_flags_t.flag_seed_mode
|
||||||
|
|
||||||
if magnet:
|
if magnet:
|
||||||
add_torrent_params["url"] = utf8_encoded(magnet)
|
add_torrent_params["url"] = utf8_encoded(magnet)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue