summaryrefslogtreecommitdiffstats
path: root/travnik.py
diff options
context:
space:
mode:
Diffstat (limited to 'travnik.py')
-rw-r--r--travnik.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/travnik.py b/travnik.py
index 98ef449..7aea6e4 100644
--- a/travnik.py
+++ b/travnik.py
@@ -79,6 +79,8 @@ class Torrent():
decoded = self.dict.get(b'info').get(b'name').decode()
except UnicodeDecodeError:
decoded = self.dict.get(b'info').get(b'name').decode("iso-8859-2")
+ except AttributeError:
+ decoded = str(self.dict.get(b'info').get(b'name'))
if search(r, decoded, IGNORECASE):
return True
for path, size in self.paths():
@@ -98,7 +100,7 @@ class Torrent():
except UnicodeDecodeError:
decoded = name.decode("iso-8859-2") # TODO we could try detecting the encoding
if search(r, decoded, IGNORECASE):
- files[decoded if decode else name] = content
+ files[decoded if decode else name] = content if type(content) is int else {}
if type(content) is dict:
inhalt = matching_files_r(content, r, decode)
if inhalt: