2021-03-22, 17:34
(2020-03-13, 13:07)ronie Wrote: a bit of background info (reason for this change) can be found here: https://github.com/xbmc/xbmc/pull/3573
python:line1 = "Hello World! We can write anything we want here Using Python"
xbmcgui.Dialog().ok(addonname, line1)
will work with kodi Matrix and all previous versions of kodi back to 2013.
I'm a little late to this, but if I try to pass information to the script in the form of variables in an external bash script, POSTed using a rpc call, all I get is the variables (not their values) in the pop-up box.
My relevant line in addon.py (Kodi Leia) is:
line1 = "sys.argv[2] sys.argv[3] now.strftime('%Y-%m-%d %H:%M')"
For what it's worth I'm passing CallerID Name, CallerID Number, Date to the addon like this:
curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"id":1,"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.hello.world","params":["CallerID Name: '"$CIDName"'","CallerID Number: '"$CIDNumber2"'","System Time Placeholder",""]}}' http://username:[email protected]:8080/jsonrpc
The CIDName and CIDNumber2 variables I get from mgetty.
I'm a newbie to python and would like to figure out how I pass multiple variables where I previosuly had:
line1 = sys.argv[1]
line2 = sys.argv[2]
line3 = now.strftime("%Y-%m-%d %H:%M")
xbmcgui.Dialog().ok(addonname, line1, line2, line3)
And that worked just fine ... thanks for any hlep
: