diff --git a/deluge/ui/web/json_api.py b/deluge/ui/web/json_api.py index fbf4fa16f..c7733cf8a 100644 --- a/deluge/ui/web/json_api.py +++ b/deluge/ui/web/json_api.py @@ -474,8 +474,15 @@ class WebApi(JSONComponent): """ Add torrents by file - :param torrents: dict, a list of dictionaries containing the torrent + :param torrents: A list of dictionaries containing the torrent path and torrent options to add with. + :type torrents: list + + **Usage** + >>> json_api.add_torrents([{ + "path": "/tmp/deluge-web/some-torrent-file.torrent", + "options": {"download_path": "/home/deluge/"} + }]) """ for torrent in torrents: filename = os.path.basename(torrent["path"])