idlesign / deluge-webapi

Plugin for Deluge WebUI providing sane JSON API
https://github.com/idlesign/deluge-webapi
BSD 3-Clause "New" or "Revised" License
120 stars 27 forks source link

get_torrents extra info #33

Open uxodb opened 2 years ago

uxodb commented 2 years ago

Im having a hard time supplying params with something else than leaving it empty, if I supply it with for example only "name" the results are empty.

This is what I get back when I supply params with something: {"result": {"torrents": []}, "error": null, "id": 2}

Leaving params empty gives me the name, hash, save_path and comment.

{"method": "webapi.get_torrents", "params": [], "id": 2} <- works {"method": "webapi.get_torrents", "params": ["name"], "id": 2} <- doesnt work

idlesign commented 2 years ago

In your case you may want to try passing params as a comma-separated string: https://github.com/idlesign/deluge-webapi/blob/master/webapi/webui.py#L39