| 55 | |
| 56 | === download_torrent_from_url(url) === |
| 57 | input: |
| 58 | {{{ |
| 59 | url: the url of the torrent to download |
| 60 | }}} |
| 61 | returns: |
| 62 | {{{ |
| 63 | filename: the temporary file name of the torrent file |
| 64 | }}} |
| 65 | |
| 66 | === get_torrent_info(filename) === |
| 67 | Goal: |
| 68 | allow the webui to retrieve data about the torrent |
| 69 | |
| 70 | input: |
| 71 | {{{ |
| 72 | filename: the filename of the torrent to gather info about |
| 73 | }}} |
| 74 | |
| 75 | returns: |
| 76 | {{{ |
| 77 | { |
| 78 | "filename": the torrent file |
| 79 | "name": the torrent name |
| 80 | "size": the total size of the torrent |
| 81 | "files": the files the torrent contains |
| 82 | "info_hash" the torrents info_hash |
| 83 | } |
| 84 | }}} |
| 85 | |
| 86 | === add_torrents(torrents) === |
| 87 | input: |
| 88 | {{{ |
| 89 | torrents [{ |
| 90 | path: the path of the torrent file, |
| 91 | options: the torrent options |
| 92 | }] |
| 93 | }}} |