xbmc.notification help
#1
Question 
Could someone throw some light on the two params of time and image when used with xbmc.notification()

time: I've been informed it should be milliseconds, but ieven if I pass 140000 (14secs) it shows for the default time (~3secs)

example command used:

Code:
xbmc.executebuiltin("XBMC.Notification('heading','message',time=14000)")

image: Always attempts to load filename from the current skins media folder.

ERROR: Texture manager unable to load file: Q:\skin\Project Mayhem III\media\image=Q:\scripts\myscriptname\resources\notify.gif

example command used:

Code:
xbmc.executebuiltin("XBMC.Notification('heading','message',image='Q:\scripts\myscriptname\resources\notify.gif')")

Is it possible to get it to load an image from your own scripts path?
Is there a preferred image type/size ?

Thanks
Retired from Add-on dev
Reply
#2
i dont think you need to put time= ... just the value for notifcations.

("Title","Message","14000","q:\\userdata\\thumbnails\\icons\\imanicon.gif")

Cannot recall if it uses "" though but the above i think would work.
Reply
#3
That sorted the time (quotes not needed btw). thanks.

but image still gives the error

ERROR: Texture manager unable to load file: Q:\skin\Project Mayhem III\media\"q:\userdata\thumbnails\icons\notify.gif"

Its seems to be hardcoded to join whatevers passed onto current skin path?
Retired from Add-on dev
Reply
#4
Here is a simple solution, it only works in PM3 though, i've tested PM3 and MC360.

Code:
import xbmc, xbmcgui
import os

imgPath = os.path.join(os.getcwd().replace(';',''), 'resources').lstrip("Q:\\")
imgFile = imgPath + "\\preview.png"

xbmc.executebuiltin('XBMC.Notification(heading,message,5000,..\\..\\..\\' + imgFile + ')')
Reply
#5
Thanks for having a look at it. but tbh, as its only a PMIII solution, its not ideal.

Ideally, XBMC.Notification() could check in the path given before looking for filename in the skin path.
Retired from Add-on dev
Reply

Logout Mark Read Team Forum Stats Members Help
xbmc.notification help0