m0ngr31 / kodi-voice

Python library for interacting with Kodi (especially with Voice)
MIT License
19 stars 23 forks source link

Support for non-blocking JSON requests. #13

Closed jingai closed 7 years ago

jingai commented 7 years ago

Where possible. Some commands we don't respond any differently for success vs failure -- or simply don't care. This speeds up the 'apparent' response time from Alexa quite a lot. There is a small 'real' gain as well in that we're not waiting for the response from Kodi, though the responses for these are small anyway.

This includes:

Problems connecting or transmitting the request will still raise an error. This only applies to the JSON response from Kodi, since for the above things we don't report any differently to the user. Might as well report earlier to avoid potential timeouts on the Alexa side of things.

A test package is up here for those that need/want it.

jingai commented 7 years ago

All merged :)