Fix for deluge-console adding torrent files in Windows
This commit is contained in:
parent
e688b45448
commit
9bca1a72b1
|
@ -71,7 +71,7 @@ class Command(BaseCommand):
|
|||
continue
|
||||
self.console.write("{!info!}Attempting to add torrent: %s" % arg)
|
||||
filename = os.path.split(arg)[-1]
|
||||
filedump = base64.encodestring(open(arg).read())
|
||||
filedump = base64.encodestring(open(arg, "rb").read())
|
||||
|
||||
def on_success(result):
|
||||
self.console.write("{!success!}Torrent added!")
|
||||
|
|
|
@ -369,7 +369,7 @@ class CreateTorrentDialog:
|
|||
if add_to_session:
|
||||
client.core.add_torrent_file(
|
||||
os.path.split(target)[-1],
|
||||
base64.encodestring(open(target).read()),
|
||||
base64.encodestring(open(target, "rb").read()),
|
||||
{"download_location": os.path.split(path)[0]})
|
||||
|
||||
def _on_create_torrent_progress(self, value, num_pieces):
|
||||
|
|
Loading…
Reference in New Issue