mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
add_torrent_file_binary
This commit is contained in:
parent
2c12368fad
commit
ada8d5641f
1 changed files with 9 additions and 0 deletions
|
@ -221,6 +221,15 @@ class BaseClient(object):
|
||||||
options = None
|
options = None
|
||||||
self.get_method("add_torrent_file")(filename, fdump, options)
|
self.get_method("add_torrent_file")(filename, fdump, options)
|
||||||
|
|
||||||
|
def add_torrent_file_binary(self, filename, fdump, options = None):
|
||||||
|
"""
|
||||||
|
Core-wrapper.
|
||||||
|
Adds 1 torrent file to the core.
|
||||||
|
Expects fdump as a bytestring (== result of f.read()).
|
||||||
|
"""
|
||||||
|
fdump_xmlrpc = xmlrpclib.Binary(fdump)
|
||||||
|
self.get_method("add_torrent_file")(filename, fdump_xmlrpc, options)
|
||||||
|
|
||||||
#utility:
|
#utility:
|
||||||
def has_callback(self, method_name):
|
def has_callback(self, method_name):
|
||||||
return not (method_name in self.no_callback_list)
|
return not (method_name in self.no_callback_list)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue