From 76b89a7943df58da9a3fb904fb130eced403f5a3 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 11 May 2019 18:52:54 +0100 Subject: [PATCH] [#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. --- deluge/ui/console/modes/torrentlist/torrentactions.py | 6 +++--- 1 file 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):