From d9bd330129ebee602699e2ff918ad77bd81c9347 Mon Sep 17 00:00:00 2001 From: sqozz Date: Sun, 1 Apr 2018 20:04:52 +0200 Subject: [PATCH] Fix torrent creation encoding --- indexer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indexer.py b/indexer.py index 9f1e7d7..083917e 100644 --- a/indexer.py +++ b/indexer.py @@ -295,13 +295,13 @@ class Metadata(): return self.fileid = fileid self.bcoded = bencoder.decode(torrent) - self.created_by = self.bcoded.get(b'created by', b"").decode("utf-8", "ignore") + self.created_by = self.bcoded.get(b'created by', b"") self.creation_date = self.bcoded.get(b'creation date', 0) self.announce_url = self.bcoded.get(b'info', dict()).get(b'', "") self.source = self.bcoded.get(b'info', dict()).get(b'source', b"") self.torrentsize = ((len(self.bcoded.get(b'info', dict()).get(b'pieces', "")) / 20) * self.bcoded.get(b'info', dict()).get(b'piece length')) self.torrentsize_human = size(self.torrentsize) - self.name = self.bcoded.get(b'info', dict()).get(b'name', b"").decode("utf-8", "ignore") + self.name = self.bcoded.get(b'info', dict()).get(b'name', b"") self.private = self.bcoded.get(b'info', dict()).get(b'private', b"") def writeToDb(self, cursor):