Skip to content

Commit fed4114

Browse files
xorioledevos50
authored andcommitted
Fixed search keyword list; Fixes #4187
1 parent c83e11b commit fed4114

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Tribler/Core/CacheDB/SqliteCacheDBHandler.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -907,11 +907,15 @@ def relevance_score_remote_torrent(self, torrent_name):
907907
"""
908908
if self.latest_matchinfo_torrent is None:
909909
return 0.0
910-
matchinfo, keywords = self.latest_matchinfo_torrent
910+
matchinfo, raw_keywords = self.latest_matchinfo_torrent
911911

912912
# Make sure the strings are utf-8 encoded
913-
if not isinstance(keywords, text_type):
914-
keywords = keywords.decode('raw_unicode_escape')
913+
keywords = []
914+
for keyword in raw_keywords:
915+
if not isinstance(keyword, text_type):
916+
keyword = keyword.decode('raw_unicode_escape')
917+
keywords.append(keyword)
918+
915919
if not isinstance(torrent_name, text_type):
916920
torrent_name = torrent_name.decode('raw_unicode_escape')
917921

0 commit comments

Comments
 (0)