[#2826] Fix create_torrent filedump not encoded

This commit is contained in:
Calum Lind 2017-02-20 19:06:24 +00:00
parent 4a62c5eac2
commit f6e2dab58a
1 changed files with 2 additions and 1 deletions

View File

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