on_torrent_removed event

Suggestions and discussion of future versions
Post Reply
ledzgio
Member
Member
Posts: 29
Joined: Tue Oct 20, 2009 9:24 pm

on_torrent_removed event

Post by ledzgio »

Hi to all,

from my plugin, I would like to do something when a torrent is completed and removed from the queue.

So I have registered the event:
component.get("EventManager").register_event_handler("TorrentRemovedEvent", self._on_torrent_removed)

Inside the function _on_torrent_removed(self, torrent_id) I put:
torrent = component.get("TorrentManager")[torrent_id]

I want to access the torrent object, but this line raise a KeyError exception, why? torrent_id is valorized, what could be the problem? May the torrent not present in the session anymore?

thanks
s0undt3ch
New User
New User
Posts: 5
Joined: Sun May 08, 2011 10:57 pm

Re: on_torrent_removed event

Post by s0undt3ch »

It you're still after this, which I doubt, TorrentPreRemovedEvent I think.
Post Reply