Hi.
Sorry if this is a stupid question, but I've been trying to get variables from eg.result without success. I hope someone can help.
I have used the xbmc2 plugin to query kodi for the currently playing media. It returns a result like this:
{u'item': {u'title': u'Terrorform', u'type': u'episode', u'id': 6100, u'showtitle': u'Red Dwarf', u'label': u'Terrorform'}}
What I'd like to do is take each of those as a variable to display with the webserver plugin, but I cannot work out how to do it.
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
How to get data from eg.result
Re: How to get data from eg.result
Code: Select all
print eg.result['item']['showtitle'] + " - " + eg.result['item']['title']Code: Select all
eg.globals.kodishowtitle = eg.result['item']['showtitle']as for the webserver stuff. if you take a look at this demo it should help you out, viewtopic.php?f=13&t=9487. If you have a further questions, just ask.
Re: How to get data from eg.result
Thank you so much. With your help, I've got it working.