[#2826] Fix create_torrent filedump not encoded

This commit is contained in:
Calum Lind 2017-02-20 19:06:24 +00:00
parent c39f00fa0b
commit 3ba5443c76

View file

@ -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):