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.

How to get data from eg.result

If you have a question or need help, this is the place to be.
Post Reply
Tomkun
Posts: 22
Joined: Wed Sep 14, 2011 4:40 am

How to get data from eg.result

Post by Tomkun »

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.
User avatar
yokel22
Experienced User
Posts: 265
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: How to get data from eg.result

Post by yokel22 »

Code: Select all

print eg.result['item']['showtitle'] + " - " + eg.result['item']['title']
or set a eg.global variable with a returned variable

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.
Tomkun
Posts: 22
Joined: Wed Sep 14, 2011 4:40 am

Re: How to get data from eg.result

Post by Tomkun »

Thank you so much. With your help, I've got it working.
Post Reply