Check if a torrent went into an error state

somus1735

Member
May 25, 2018
833
0
16
I did a lot of searching and I can't seem to find anything that looks for an event when a torrent goes into an error state.

Basically, I want to send myself notification via a simple shell script that triggers when a torrent enters an error state (example: it becomes unregistered on a tracker i.e. nuked and replaced with a proper release).

I found a lot of ways to handle when something is finished:

event.download.finished

But I want something if it hits that error state and I can fire off my scripts.

Any thoughts on this topic?
 

shwetha17

Member
May 24, 2018
785
0
16
I think a possible solution would be to watch event.download.paused and then do a check on the state with d.get_state and depending on the result, run the script. This is assuming that you only want to run your script when there's an error which causes downloading or seeding to be interrupted.