Hi all, I'm implementing a simple gui for qbittorrent, using the new WebUIAPI v2. My problem is, when adding a download via a magnet uri, the /command/download method does not return a handle to the download. As I need to track its state (to perform certain file operation once it's finished) I had to resource to the hash contained in the uri. It works ok, except when it's a base32 hash, in such a case, qbittorrent seems to convert it to sha1 and use that for all the api methods. My goal would be to perform myself the conversion so i can match the hash used by bittorrent. I don´t know how to do that (seems trivial in python, but i´m using delphi) Any ideas? Thanks in advance!
[Edit]
I´ve recently added an entry to the wiki with more details about this, it´s here:
https://github.com/qbittorrent/qBittorrent/wiki/How-to-convert-base32-to-base16-info-hashes
[SOLVED] WebUIAPI: how to track a base32 infohash download
[SOLVED] WebUIAPI: how to track a base32 infohash download
Last edited by plinplocho on Thu May 28, 2015 10:32 pm, edited 1 time in total.
Re: WebUIAPI: how to track a base32 infohash download
Solved myself. All i had to do is decode the hash (originally base32 encoded) and then re-encode it in base16. Just for the record, in delphi I've used SZCodeBaseX library, something like:
Hash16:= SZEncodeBase16(SZDecodeBase32(Hash32));
Thanks anyway!
Hash16:= SZEncodeBase16(SZDecodeBase32(Hash32));
Thanks anyway!
Re: WebUIAPI: how to track a base32 infohash download
Good
. Thanks for writing down the way you have solved it. Might help others who are having the same issue.
And welcome by the way.

And welcome by the way.
Re: WebUIAPI: how to track a base32 infohash download
Thanks Nemo, let me add that the new webUI api is great!
Re: WebUIAPI: how to track a base32 infohash download
[quote="Nemo"]
Good
. Thanks for writing down the way you have solved it. Might help others who are having the same issue.
[/quote]
Flesh it out a bit and put it up as a page on the Wiki (http://wiki.qbittorrent.org)
Good

[/quote]
Flesh it out a bit and put it up as a page on the Wiki (http://wiki.qbittorrent.org)
Re: WebUIAPI: how to track a base32 infohash download
[quote="ciaobaby"]
[quote="Nemo"]
Good
. Thanks for writing down the way you have solved it. Might help others who are having the same issue.
[/quote]
Flesh it out a bit and put it up as a page on the Wiki (http://wiki.qbittorrent.org)
[/quote]
Let me know if I can help with that
[quote="Nemo"]
Good

[/quote]
Flesh it out a bit and put it up as a page on the Wiki (http://wiki.qbittorrent.org)
[/quote]
Let me know if I can help with that
Re: WebUIAPI: how to track a base32 infohash download
[quote="plinplocho"]
[quote="ciaobaby"]
Flesh it out a bit and put it up as a page on the Wiki (http://wiki.qbittorrent.org)
[/quote]
Let me know if I can help with that
[/quote]
I was rather suggesting that you could do that,
Personally I haven't done any Delphi programming for over ten years, though as Pascal was the pretty much the first 'serious' language I learned to code in, I do have a bit of a 'soft spot' for Delphi.
[quote="ciaobaby"]
Flesh it out a bit and put it up as a page on the Wiki (http://wiki.qbittorrent.org)
[/quote]
Let me know if I can help with that
[/quote]
I was rather suggesting that you could do that,

Personally I haven't done any Delphi programming for over ten years, though as Pascal was the pretty much the first 'serious' language I learned to code in, I do have a bit of a 'soft spot' for Delphi.

Re: [SOLVED] WebUIAPI: how to track a base32 infohash download
ok ciaobaby, i´ll try then. English is not my native tongue so it´s a little bit harder for me so i´ll probably ask you for some advice before posting.
Re: [SOLVED] WebUIAPI: how to track a base32 infohash download
Don't worry too much about getting the language precise, there are a few native English speakers (and a some Americans
) who can and will edit any grammar, typos or spellnig errors should it need any 'fixing' to hone the document into final shape

Re: [SOLVED] WebUIAPI: how to track a base32 infohash download
Well, for everyone interested in this, I added an entry to the wiki, the link is in my first post.