fix uploading plugins when the daemon is not localhost
This commit is contained in:
parent
2840d43ccb
commit
9e9fbd6242
@ -17,6 +17,7 @@
|
|||||||
torrent creation
|
torrent creation
|
||||||
* Fix crash in Windows when creating a torrent
|
* Fix crash in Windows when creating a torrent
|
||||||
* Add button to Other preferences to associate magnet links with Deluge
|
* Add button to Other preferences to associate magnet links with Deluge
|
||||||
|
* Fix uploading plugins when the daemon is not localhost
|
||||||
|
|
||||||
==== Console ====
|
==== Console ====
|
||||||
* Fix using the console in Windows, but only in command-line mode
|
* Fix using the console in Windows, but only in command-line mode
|
||||||
|
|||||||
@ -932,6 +932,7 @@ class Preferences(component.Component):
|
|||||||
chooser.destroy()
|
chooser.destroy()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
import base64
|
||||||
import shutil
|
import shutil
|
||||||
import os.path
|
import os.path
|
||||||
filename = os.path.split(filepath)[1]
|
filename = os.path.split(filepath)[1]
|
||||||
@ -943,9 +944,8 @@ class Preferences(component.Component):
|
|||||||
|
|
||||||
if not client.is_localhost():
|
if not client.is_localhost():
|
||||||
# We need to send this plugin to the daemon
|
# We need to send this plugin to the daemon
|
||||||
client.core.upload_plugin(
|
filedump = base64.encodestring(open(filepath, "rb").read())
|
||||||
filename,
|
client.core.upload_plugin(filename, filedump)
|
||||||
xmlrpclib.Binary(open(filepath, "rb").read()))
|
|
||||||
|
|
||||||
client.core.rescan_plugins()
|
client.core.rescan_plugins()
|
||||||
chooser.destroy()
|
chooser.destroy()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user