I’m finding with a service addon that abortRequested is rather inconsistent.
E.g.
Windows – if I hit the close window button, it isn’t called. If I shutdown Kodi via it’s own shutdown, it is.
LibreElec – It doesn’t appear to be called on a reboot via the close menu, or on a shutdown via the remote.
The real question is – is there any guaranteed way to run some addon code (I want to turn a device off) – on exit of Kodi, that behaves consistently. Obviously it if crashes, weird behaviour is expected, but I’d have thought that and regular close/shutdown would trigger the addon abort stuff.
(and atexit doesn’t work with Kodi right?)