summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2019-05-11 18:52:54 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2019-05-11 19:05:42 +0100
commit76b89a7943df58da9a3fb904fb130eced403f5a3 (patch)
treef42e6b042c337e17b8ac34804a581897e8608e36
parent6ff7a5400f65d4d4237a1b1fa810b125168788db (diff)
downloaddeluge-76b89a7943df58da9a3fb904fb130eced403f5a3.tar.gz
deluge-76b89a7943df58da9a3fb904fb130eced403f5a3.tar.bz2
deluge-76b89a7943df58da9a3fb904fb130eced403f5a3.zip
[#3250|Console] Fix unable to remove torrent
Trying to remove a torrent had no effect and resulted in the following error: `'TorrentList' object has no attribute 'clear_marked'` * The clear_marked call needs to be made with torrentview instead. * Ensure the popup dialog is closed upon deleting the torrent.
-rw-r--r--deluge/ui/console/modes/torrentlist/torrentactions.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/deluge/ui/console/modes/torrentlist/torrentactions.py b/deluge/ui/console/modes/torrentlist/torrentactions.py
index 4d483870c..f3cd39509 100644
--- a/deluge/ui/console/modes/torrentlist/torrentactions.py
+++ b/deluge/ui/console/modes/torrentlist/torrentactions.py
@@ -39,7 +39,7 @@ def action_remove(mode=None, torrent_ids=None, **kwargs):
mode.pop_popup()
return True
- mode.clear_marked()
+ mode.torrentview.clear_marked()
remove_data = data['remove_files']['value']
def on_removed_finished(errors):
@@ -54,6 +54,7 @@ def action_remove(mode=None, torrent_ids=None, **kwargs):
d = client.core.remove_torrents(torrent_ids, remove_data)
d.addCallback(on_removed_finished)
+ mode.pop_popup()
def got_status(status):
return (status['name'], status['state'])
@@ -191,10 +192,9 @@ def torrent_action(action, *args, **kwargs):
elif action == ACTION.QUEUE:
queue_mode = QueueMode(mode, torrent_ids)
queue_mode.popup(**kwargs)
- return False
elif action == ACTION.REMOVE:
action_remove(**kwargs)
- return False
+ retval = True
elif action == ACTION.MOVE_STORAGE:
def do_move(res, **kwargs):