Registered Member
|
Hi
I'm using the dbus interface to control/monitor ktorrent version 3.3.4. I can make calls using python dbus to get torrent info i.e. list, names, speed etc, however I cant find a way of getting a runtime state i.e. started, stopped, completed, etc. I have to try to calculate this by looking at the dld stats, which i dont think is correct. Is there a proper way to get this info? Also in the GUI you can see groups i.e active,passive, running, not running etc. I could use this information to derive the torrent state, however these default groups appear not to be available via dbus either. I can see manually created ones. Can anyone comment/help please? ps. I think ktorrent is the best torrent app there is. Thanks Chris |
Registered Member
|
im now at version 4.2 dev, still the same story, no run state in the torrents. I might look into adding this myself. it'd be a good place to start..
|
Moderator
|
There is the stats call which returns at lot of information in a bencoded manner, including the current status in the form of a string.
|
Registered Member
|
thanks, works nicely with the bencode linked below
http://effbot.org/zone/bencode.htm 171 def decode_torrents(self): 172 torrents = self.core.torrents() 173 for t in torrents: 174 tor = self.get_tor_if(t) 175 data = tor.stats(byte_arrays=True) 176 data = bencode.decode(data) 177 print tor.name(),data["status"] |
Registered users: bancha, Bing [Bot], Google [Bot], Sogou [Bot]