yoav.ost Posted September 24, 2010 Report Share Posted September 24, 2010 Hello Everyone,I'm writing an application that works with a remote uTorrent using the API.I get a torrent link from an RSS feed and adds it to the uTorrent.For future reference, I would like to save the torrents hash code in my DB.What I thought of doing is 1. Getting the list of torrents before2. Save the cache ID3. Add the torrent4. Get the changed torrents using the cache ID I have 5. Find my torrent (last in queue) and save it's hash code.Unfortuantly, this algorithm is not working so well.Getting the changed torrents is not working so good and my assumption about the queue location is not always correct.Anyone has a better idea? Is there an API function for me to calculate the hash code?It would be very nice if after adding a new torrent I'll get the hash code back (in JSON).Thanks,Yoav Link to comment Share on other sites More sharing options...
Ultima Posted September 24, 2010 Report Share Posted September 24, 2010 That I can think of, there isn't really a simple way to do this (get hashes for torrents newly added via RSS filters) accurately with 2.0.Using 3.0 though, µTorrent does send with the torrent list a field indicating what feed the torrent was added from, and that should provide you with a more accurate way to track what you need. Link to comment Share on other sites More sharing options...
yoav.ost Posted September 24, 2010 Author Report Share Posted September 24, 2010 When does 3.0 come out? Maybe you can just release an update that after adding a torrent I get the hash code back? Link to comment Share on other sites More sharing options...
Lord Alderaan Posted October 1, 2010 Report Share Posted October 1, 2010 What I do in the Webui Shell is I programatically download and access the .torrent using a bencode library and make generate the infohash myself.php:$bdecode=BDecode(file_get_contents($torrentfile)); $hash=strtoupper(sha1(BEncode($bdecode['info']))); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.