diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2017-02-20 19:06:24 +0000 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2017-02-20 22:40:14 +0000 |
commit | 3ba5443c76306dc6263ef7adcc61a3991a5e25e9 (patch) | |
tree | 39913dc20fc1ad4d9b6067a57caaff6155cd6c3a | |
parent | c39f00fa0bc29d46e70007a759eccf5602da02a5 (diff) | |
download | deluge-3ba5443c76306dc6263ef7adcc61a3991a5e25e9.tar.gz deluge-3ba5443c76306dc6263ef7adcc61a3991a5e25e9.tar.bz2 deluge-3ba5443c76306dc6263ef7adcc61a3991a5e25e9.zip |
[#2826] Fix create_torrent filedump not encoded
-rw-r--r-- | deluge/core/core.py | 3 |
1 files changed, 2 insertions, 1 deletions
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): |