Kodi Community Forum
A very simple add-on, that couldn't be closed. How? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: A very simple add-on, that couldn't be closed. How? (/showthread.php?tid=332816)



A very simple add-on, that couldn't be closed. How? - ArtUrlWWW - 2018-06-14

Hello.
I want to make a very simple video add-on, that will show hardcodded list of videos and this plugin I plan to start with autoexec.py on my TV-Box, with Libreelec.
My parents are too old and I should to make a very simple video choosing interface, that shouldn't be closed. For example, my parents could press some key accidentally and they could close add-on in Kodi.
How to force KODI to don't allow to close interface of add-on, even if pressed Esc on keyboard or right mouse button?
Currently, my mod is just a fork of https://github.com/romanvm/plugin.video.example with 90% similar code.
Thank you for reading this, for your time.


RE: A very simple add-on, that couldn't be closed. How? - DarrenHill - 2018-06-14

Thread moved to addon development


RE: A very simple add-on, that couldn't be closed. How? - Takezo36 - 2018-06-16

Hi
What you could do is build your own Window and override the onaction method https://codedocs.xyz/xbmc/xbmc/group__python__xbmcgui__window__cb.html#ga2221042e947177b98a03a1002b029c75

However be aware that you might get stuck in the window if you are catching the nav back action.

AFAIK there is no other way to hook into actions


RE: A very simple add-on, that couldn't be closed. How? - ArtUrlWWW - 2018-06-16

Ohhhh, thank you, that's what I need!