Kodi Community Forum

Full Version: Display message at shutdown
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

My Kodi 19 (used with Mac OS) is quite long to shutdown. It's not a big deal, but I'd like to display a message WHILE Kodi is shutting down, to be sure I pressed the good button on the remote. So I created a python script that display a message and then shut down Kodi. I launch this script with a shortcut on the menu. Here's the script :

import xbmc, xbmcgui
dialog = xbmcgui.Dialog()
ret = dialog.yesno('Kodi va quitter', 'Adios amigos !',' ',' ',5000)
xbmc.executebuiltin('Shutdown')

It works, but it's not very elegant : it displays the message, and only starts shuting down AFTER displaying the message.
I tried with notifications, it's worse, the shutdown action kills the notification and I don't even have the time to read it.

I would prefer a message displaying WHILE Kodi is shuting down.
Is that possible ?

Thanks !
given the lack of responses it seems nobody has really done this. my expectation is that if a notification only flashes on the screen then anything else you attempt to display would have the same behavior
i have only 1 idea for you, seeing that you are already using scripting methods maybe look into trying to open a single image on shutdown with player.open - https://kodi.wiki/view/JSON-RPC_API/v13#Player.Open
failing that maybe you can find something mac specific to show a shutdown animation/logo
Thanks for your answer ! I’ll try that and let you know.
I'm not familiar with json stuffs and displaying an image doesn't seems to be easy neither... I think I will do a Feature Request and wait few months Wink

Where is the best place for a feature request ? On this forum or in the Issues of the GitHub page ?
It shuts down after the dialog because you have used dialogyesno so you have to answer yes or no  to it to get it to shutdown.  Your code takes no account of what you actually answered. Probably better to use dialog.notification() with a timeout.  See https://alwinesch.github.io/group__pytho...0a08deed85
I did tried with dialog.notification() but the notification was immediately closed by the shutdown command and didn't let the time to read it.
But maybe I did it the wrong way, I'll give a new try. Thanks
I confirm that when I execute the script :

import xbmc, xbmcgui
dialog = xbmcgui.Dialog()
dialog.notification('Kodi va quitter', 'Adios amigos !', xbmcgui.NOTIFICATION_INFO, 5000)
xbmc.executebuiltin('Shutdown')

No notification is displayed, and Kodi shuts down.
(that's why I was using the yesno version, as it displays something)
So, back to my question : where is the best place to do a feature request ? Thanks !
I created a feature request on the Github.

No feature request on the github, they told me to do it here.