https://flyingdeuk.github.io/posts/KODI-promise/