Kodi Community Forum

Full Version: KaiToast Label
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I've created a python script which should save a notification in a sqlite database so that I can show a list with the recent notifications. But somehow I can't get the text from the label (401)... $INFO[Control.GetLabel(401)] seems only to work if its in a <label> or <texture> tag. I can't get it in python or set it as a window property, it's always empty. Tried it in other dialogs (e.g. progress dialog) and it's working there but not in kai toast. Is there maybe another possibility how I can grab the notification in python?
The problem is the kai toast dialog is modeless, so you can't grab the control from the window.

What are you trying to do?
I want to show a list with the 15 or 20 most recent notifications. For that I have a script which saves the label + current date in a sqlite database so that I can read the database on startup and set the newest entries as a window property (e.g. Window(Home).Propery(LatestNotification.1.Text). But since the label is always empty, I have no idea if it's even possible then...
And why do you want to show a list with the last 15-20 notifications? What benefit exactly does it provide the users of the skin?

What I'm getting at is: Should XBMC be providing this information?
I wanted to have something like a recent updates list for addons. As I'm showing only a little info icon without any information of the notification, I wanded to provide a small upadte history elsewhere in the skin for the user to check anytime if he's interested.

So yeah would be nice if XBMC could provide those infos but if it does they should be available anywhere in the skin. But for now it would be enough to get the notification label, my script works so far.