Skip to content

Commit

Permalink
[Console] Fix 'move' command hanging when done
Browse files Browse the repository at this point in the history
Console.get_torrent_name() expects string, but was given list from console.match_torrent(), so NoneType breaking join() in move message. Simplified and fixed now.

Co-authored-by: Calum Lind <[email protected]>
  • Loading branch information
mhertz and cas-- committed Sep 10, 2024
1 parent bee0872 commit 8b9c283
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions deluge/ui/console/cmdline/commands/move.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,8 @@ def handle(self, options):
)
return

ids = []
names = []
for t_id in options.torrent_ids:
tid = self.console.match_torrent(t_id)
ids.extend(tid)
ids = self.console.match_torrents(options.torrent_ids)
names = [self.console.get_torrent_name(id) for id in ids]
ids = self.console.match_torrents(options.torrent_ids)
names = [self.console.get_torrent_name(id_) for id_ in ids]

def on_move(res):
msg = 'Moved "{}" to {}'.format(', '.join(names), options.path)
Expand Down

0 comments on commit 8b9c283

Please sign in to comment.