| 13 | === update_ui(keys ,filter_dict , cache_id = None ) === |
| 14 | Composite call. |
| 15 | Goal : limit the number of ajax calls |
| 16 | ==== input ==== |
| 17 | {{{ |
| 18 | keys: see get_torrent_status |
| 19 | filter_dict: see label_get_filtered_ids # only effective if the label plugin is enabled. |
| 20 | cache_id: # todo |
| 21 | }}} |
| 22 | ==== output ==== |
| 23 | {{{ |
| 24 | { |
| 25 | "torrents": see get_torrent_status |
| 26 | "filters": see label_get_filters |
| 27 | "stats": see get_stats |
| 28 | "cache_id":int # todo |
| 29 | } |
| 30 | }}} |
| 31 | |
| 32 | === get_stats() === |
| 33 | ==== output ==== |
| 34 | {{{ |
| 35 | { |
| 36 | 'download_rate':float(), |
| 37 | 'upload_rate':float(), |
| 38 | 'max_download':float(), |
| 39 | 'max_upload':float(), |
| 40 | 'num_connections':int(), |
| 41 | 'max_num_connections':int(), |
| 42 | 'dht_nodes',int() |
| 43 | } |
| 44 | }}} |