From 3ba5443c76306dc6263ef7adcc61a3991a5e25e9 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Mon, 20 Feb 2017 19:06:24 +0000 Subject: [PATCH] [#2826] Fix create_torrent filedump not encoded --- deluge/core/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deluge/core/core.py b/deluge/core/core.py index def2aa70b..0f1e310c1 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -667,7 +667,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):