Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
v19 Display message at shutdown
#1
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 !
Reply
#2
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
Reply
#3
Thanks for your answer ! I’ll try that and let you know.
Reply
#4
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 ?
Reply
#5
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
Learning Linux the hard way !!
Reply
#6
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
Reply
#7
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)
Reply
#8
So, back to my question : where is the best place to do a feature request ? Thanks !
Reply
#9
I created a feature request on the Github.

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

Logout Mark Read Team Forum Stats Members Help
Display message at shutdown0