mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 03:24:54 +00:00
fix uploading plugins when the daemon is not localhost
This commit is contained in:
parent
2840d43ccb
commit
9e9fbd6242
2 changed files with 4 additions and 3 deletions
|
@ -17,6 +17,7 @@
|
|||
torrent creation
|
||||
* Fix crash in Windows when creating a torrent
|
||||
* Add button to Other preferences to associate magnet links with Deluge
|
||||
* Fix uploading plugins when the daemon is not localhost
|
||||
|
||||
==== Console ====
|
||||
* Fix using the console in Windows, but only in command-line mode
|
||||
|
|
|
@ -932,6 +932,7 @@ class Preferences(component.Component):
|
|||
chooser.destroy()
|
||||
return
|
||||
|
||||
import base64
|
||||
import shutil
|
||||
import os.path
|
||||
filename = os.path.split(filepath)[1]
|
||||
|
@ -943,9 +944,8 @@ class Preferences(component.Component):
|
|||
|
||||
if not client.is_localhost():
|
||||
# We need to send this plugin to the daemon
|
||||
client.core.upload_plugin(
|
||||
filename,
|
||||
xmlrpclib.Binary(open(filepath, "rb").read()))
|
||||
filedump = base64.encodestring(open(filepath, "rb").read())
|
||||
client.core.upload_plugin(filename, filedump)
|
||||
|
||||
client.core.rescan_plugins()
|
||||
chooser.destroy()
|
||||
|
|
Loading…
Add table
Reference in a new issue