icon in Notification command - 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: icon in Notification command (/showthread.php?tid=315438) |
icon in Notification command - ed_davidson - 2017-05-31 Hi there, Im using this tutorial for a simple notification box: http://kodi.wiki/view/GUI_tutorial I was wondering what the path to the icon.png should be. I have my plugin called plugin.program.xxx but if I add it to the text below it does not work: xbmc.executebuiltin('Notification(Hello World,This is a simple example of notifications,5000,/script.hellow.world.png)') ORIGINAL TEXT IN THE WIKI xbmc.executebuiltin('Notification(KODI WILL NOW REBOOT,Your settings have not changed,5000,/plugin.program.xxx/icon.png)') MODIFIED TEXT Hoping someone can help. RE: icon in Notification command - roidy - 2017-05-31 You need to get the path to the addon directory, then add your image path to the end. Code: addon= xbmcaddon.Addon() RE: icon in Notification command - Roman_V_M - 2017-05-31 I recommend to use xbmcgui.Dialog().notification(): http://romanvm.github.io/Kodistubs/_autosummary/xbmcgui.html#xbmcgui.Dialog.notification A custom icon needs to be provided as a full path to a texture image (jpg or png). RE: icon in Notification command - ed_davidson - 2024-10-30 Further to my first post Ive got an issue with a notification box im trying to create. Id like to add the kodi version to the end. Here is my code but its not working. #kodiv = float(xbmc.getInfoLabel("System.BuildVersion")[:4]) kodiv = xbmc.getInfoLabel(System.BuildVersion) dialog = xbmcgui.Dialog() dialog.notification(('[COLOR lime] STARTING UP[/COLOR]', 'Welcome to Kodi',+str(kodiv), xbmcgui.NOTIFICATION_INFO, 10000)) RE: icon in Notification command - bossanova808 - 2024-10-30 If that is Python, and kodiv has the version number in it, then you need to remove the comma before the plus: Code:
|