Expose set_torrent_max_connections(), set_torrent_max_upload_slots(),
set_torrent_max_upload_speed(), set_torrent_max_download_speed(), set_torrent_private_flag(), set_torrent_file_priorities().
This commit is contained in:
parent
89278153bf
commit
9db2824bfe
|
@ -474,7 +474,31 @@ class Core(
|
|||
def export_set_torrent_trackers(self, torrent_id, trackers):
|
||||
"""Sets a torrents tracker list. trackers will be [{"url", "tier"}]"""
|
||||
return self.torrents[torrent_id].set_trackers(trackers)
|
||||
|
||||
def export_set_torrent_max_connections(self, torrent_id, value):
|
||||
"""Sets a torrents max number of connections"""
|
||||
return self.torrents[torrent_id].set_max_connections(value)
|
||||
|
||||
def export_set_torrent_max_upload_slots(self, torrent_id, value):
|
||||
"""Sets a torrents max number of upload slots"""
|
||||
return self.torrents[torrent_id].set_max_upload_slots(value)
|
||||
|
||||
def export_set_torrent_max_upload_speed(self, torrent_id, value):
|
||||
"""Sets a torrents max upload speed"""
|
||||
return self.torrents[torrent_id].set_max_upload_speed(value)
|
||||
|
||||
def export_set_torrent_max_download_speed(self, torrent_id, value):
|
||||
"""Sets a torrents max download speed"""
|
||||
return self.torrents[torrent_id].set_max_download_speed(value)
|
||||
|
||||
def export_set_torrent_private_flag(self, torrent_id, value):
|
||||
"""Sets a torrents private flag"""
|
||||
return self.torrents[torrent_id].set_private_flag(value)
|
||||
|
||||
def export_set_torrent_file_priorities(self, torrent_id, priorities):
|
||||
"""Sets a torrents file priorities"""
|
||||
return self.torrents[torrent_id].set_file_priorities(priorities)
|
||||
|
||||
# Signals
|
||||
def torrent_added(self, torrent_id):
|
||||
"""Emitted when a new torrent is added to the core"""
|
||||
|
|
|
@ -344,3 +344,26 @@ def set_torrent_trackers(torrent_id, trackers):
|
|||
"""Sets the torrents trackers"""
|
||||
get_core().call("set_torrent_trackers", None, torrent_id, trackers)
|
||||
|
||||
def set_torrent_max_connections(torrent_id, value):
|
||||
"""Sets a torrents max number of connections"""
|
||||
get_core().call("set_torrent_max_connections", None, torrent_id, value)
|
||||
|
||||
def set_torrent_max_upload_slots(torrent_id, value):
|
||||
"""Sets a torrents max number of upload slots"""
|
||||
get_core().call("set_torrent_max_upload_slots", None, torrent_id, value)
|
||||
|
||||
def set_torrent_max_upload_speed(torrent_id, value):
|
||||
"""Sets a torrents max upload speed"""
|
||||
get_core().call("set_torrent_max_upload_speed", None, torrent_id, value)
|
||||
|
||||
def set_torrent_max_download_speed(torrent_id, value):
|
||||
"""Sets a torrents max download speed"""
|
||||
get_core().call("set_torrent_max_download_speed", None, torrent_id, value)
|
||||
|
||||
def set_torrent_private_flag(torrent_id, value):
|
||||
"""Sets a torrents private flag"""
|
||||
get_core().call("set_torrent_private_flag", None, torrent_id, value)
|
||||
|
||||
def set_torrent_file_priorities(torrent_id, priorities):
|
||||
"""Sets a torrents file priorities"""
|
||||
get_core().call("set_torrent_file_priorities", None, torrent_id, priorities)
|
||||
|
|
Loading…
Reference in New Issue