Quote:
Originally Posted by capink
I am not sure what is happening here. Next time this occurs, please test the condition also in calibre's template tester. If it returns the device name after you have removed it, open a bug report about it. If it is happening only with action chains condition evaluator, report back here.
|
This is definitely a problem with the semantics of the device_connection_changed signal. The device information available to action chains is still set/valid during the disconnect event. I can see this by adding print() to the disconnect event template.
I can "fix" this in calibre but that will change the information available to every client of the device_connection_changed signal. I am willing to do this if Kovid agrees.
Action chains can fix this by using a QTimer.singleShot(0, ...) to run anything associated with a disconnect event.