diff --git a/deluge/core/core.py b/deluge/core/core.py index 6ec1c31c8..fe2848b9a 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -506,6 +506,10 @@ class Core( """Sets a torrents file priorities""" return self.torrents[torrent_id].set_file_priorities(priorities) + def export_set_torrent_prioritize_first_last(self, torrent_id, value): + """Sets a higher priority to the first and last pieces""" + return self.torrents[torrent_id].set_prioritize_first_last(value) + def export_block_ip_range(self, range): """Block an ip range""" try: diff --git a/deluge/ui/client.py b/deluge/ui/client.py index 2b9551e1b..7b9d8f901 100644 --- a/deluge/ui/client.py +++ b/deluge/ui/client.py @@ -161,7 +161,8 @@ class BaseClient(object): "set_torrent_private_flag", "set_torrent_file_priorities", "block_ip_range", "remove_torrent", "pause_torrent", "move_torrent", "resume_torrent", "force_reannounce", "force_recheck", - "deregister_client", "register_client", "add_torrent_file"] + "deregister_client", "register_client", "add_torrent_file", + "set_torrent_prioritize_first_last"] def __init__(self): self.core = _core