mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-07 00:48:41 +00:00
improve the docstring for the add_torrents method
This commit is contained in:
parent
9a55987ecb
commit
f6b90c0097
1 changed files with 8 additions and 1 deletions
|
@ -474,8 +474,15 @@ class WebApi(JSONComponent):
|
||||||
"""
|
"""
|
||||||
Add torrents by file
|
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.
|
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:
|
for torrent in torrents:
|
||||||
filename = os.path.basename(torrent["path"])
|
filename = os.path.basename(torrent["path"])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue