From f6e2dab58a1ae1e335ce43d26806f426843145e1 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Mon, 20 Feb 2017 19:06:24 +0000 Subject: [#2826] Fix create_torrent filedump not encoded --- deluge/core/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'deluge/core/core.py') diff --git a/deluge/core/core.py b/deluge/core/core.py index 16070cb1c..c1805411e 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -835,7 +835,8 @@ class Core(component.Component): options = {} options['download_location'] = os.path.split(path)[0] with open(target, 'rb') as _file: - self.add_torrent_file(os.path.split(target)[1], _file.read(), options) + filedump = base64.encodestring(_file.read()) + self.add_torrent_file(os.path.split(target)[1], filedump, options) @export def upload_plugin(self, filename, filedump): -- cgit