API Question - How to get Hash of New Download
Posted: Fri Dec 17, 2021 7:30 am
Hi,
I am building an application that downloads torrents through qBittorrent. It uses the Web API to upload an http url for the torrent as specified here in the documentation: https://github.com/qbittorrent/qBittorr ... ew-torrent
This works, however, my application needs to have some way to manage this torrent later on. I understand that qBittorrent's API allows me to manage torrents by their hash, but I don't have that on hand. Ideally qBittorrent would return the hash of the newly added torrent or at least some ID that I could use to manage the torrent going forward.
The only solution I can think of is to manually fetch the torrent file from the url and then decode the bencoded contents and compute the info hash myself (a process which has proved somewhat tedious so far). Is there a better way to do this that avoids me having to make the request in my application to compute the info hash?
Thanks
I am building an application that downloads torrents through qBittorrent. It uses the Web API to upload an http url for the torrent as specified here in the documentation: https://github.com/qbittorrent/qBittorr ... ew-torrent
This works, however, my application needs to have some way to manage this torrent later on. I understand that qBittorrent's API allows me to manage torrents by their hash, but I don't have that on hand. Ideally qBittorrent would return the hash of the newly added torrent or at least some ID that I could use to manage the torrent going forward.
The only solution I can think of is to manually fetch the torrent file from the url and then decode the bencoded contents and compute the info hash myself (a process which has proved somewhat tedious so far). Is there a better way to do this that avoids me having to make the request in my application to compute the info hash?
Thanks