diff --git a/deluge/core/core.py b/deluge/core/core.py index fa0164361..051548784 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -283,7 +283,7 @@ class Core( # Return False because the torrent was not added successfully return False - def export_add_torrent_url(self, url, save_path): + def export_add_torrent_url(self, url, save_path, options): log.info("Attempting to add url %s", url) # Get the actual filename of the torrent from the url provided. @@ -302,7 +302,8 @@ class Core( return False # Add the torrent to session - return self.export_add_torrent_file(filename, save_path, filedump) + return self.export_add_torrent_file( + filename, save_path, filedump, options) def export_remove_torrent(self, torrent_id, remove_torrent, remove_data): log.debug("Removing torrent %s from the core.", torrent_id) diff --git a/deluge/ui/client.py b/deluge/ui/client.py index a7377a2db..a6c2bc3a7 100644 --- a/deluge/ui/client.py +++ b/deluge/ui/client.py @@ -263,12 +263,12 @@ def add_torrent_file(torrent_files, torrent_options=None): # The torrent was not added successfully. log.warning("Torrent %s was not added successfully.", filename) -def add_torrent_url(torrent_url): +def add_torrent_url(torrent_url, options=None): """Adds torrents to the core via url""" from deluge.common import is_url if is_url(torrent_url): try: - result = get_core().add_torrent_url(torrent_url, str()) + result = get_core().add_torrent_url(torrent_url, str(), options) except (AttributeError, socket.error): set_core_uri(None) result = False