From 30eaf775c2d5563ecec30d95d5496976f385a6c2 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Wed, 18 Jan 2017 11:11:00 +0000 Subject: [PATCH] [#2948] [Console] Fix decode error comparing non-ascii (str) torrent name --- deluge/ui/console/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deluge/ui/console/main.py b/deluge/ui/console/main.py index 64afc46f5..34db1a999 100644 --- a/deluge/ui/console/main.py +++ b/deluge/ui/console/main.py @@ -425,6 +425,7 @@ Please use commands from the command line, eg:\n for torrent_id, torrent_name in self.torrents: if torrent_id.startswith(line): possible_matches.append(torrent_id) + torrent_name = deluge.common.decode_string(torrent_name) if torrent_name.startswith(line): possible_matches.append(torrent_name) @@ -459,6 +460,7 @@ Please use commands from the command line, eg:\n ret = [] string = string.decode(self.encoding) for tid, name in self.torrents: + name = deluge.common.decode_string(name) if tid.startswith(string) or name.startswith(string): ret.append(tid)