Help displaying image with GUI.ShowNotification
#1
I'm trying to display a local image file (/test/hdr10.png) and if I've read correctly, using the GUI.ShowNotification method is what to use. The exactly call I'm using is:
Quote:curl -s -X POST -H "content-type:application/json" "http://test:test@localhost:8080/jsonrpc" -d '{ "jsonrpc": "2.0", "id": "1", "method": "GUI.ShowNotification", "params": { "title":"test title", "message":"test message", "image":"image://test//hdr10.png", "displaytime":5000 } }'
It's not working however and the logfile shows:
Code:
ERROR <general>: DoWork - Direct texture file loading failed for test
DEBUG <general>: GetImageHash - unable to stat url test

The image /test/hdr10.png is:
Code:
Format                                   : PNG
Format/Info                              : Portable Network Graphic
Format_Compression                       : Deflate
Width                                    : 256 pixels
Height                                   : 256 pixels
Color space                              : RGBA
Bit depth                                : 8 bits
Compression mode                         : Lossless
Stream size                              : 77.6 KiB (100%)

Anyone know what I'm doing wrong here? Also, where is the image displayed? Does it just replace the little info/warning/error icons on either side of the message?
Reply
#2
Yes, it does only replace the icon.

Use the builtin ShowPicture(picture) command.
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#3
(2021-04-23, 12:01)sualfred Wrote: Yes, it does only replace the icon.

Use the builtin ShowPicture(picture) command.

Thanks for your suggestion. I don't only want to display the image however, I also want a message included and want the whole thing to have a short timelimit. Do you know what I have wrong in the rpc call from my original post?
Reply
#4
I have no idea if you can actually just load a local image but if it is supported your path is wrong: image://test//hdr10.png resolves to test//hdr10.png which is a relative path. What you want would be image:///test/hdr10.png. But again I have no idea if this is supported by the image:// handler.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#5
the field name "image" is mislead - the JSON-RPC API/v10 states the image is actually an enum to show an icon of the following types: info, warning, error

See schema: https://kodi.wiki/view/JSON-RPC_API/v10#...tification
Reply

Logout Mark Read Team Forum Stats Members Help
Help displaying image with GUI.ShowNotification0