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.

Exctracting payload

If you have a question or need help, this is the place to be.
fuqit2
Posts: 16
Joined: Sat May 14, 2016 6:49 pm

Re: Exctracting payload

Post by fuqit2 »

Thanks soon as I read your reply, I realized what I did wrong. thx
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Exctracting payload

Post by kgschlosser »

tanks jonib.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Exctracting payload

Post by kgschlosser »

fuqit2 wrote:man that is fantastic! I can't thank you enough for the advice and help!

no worries boss, i enjoy making someone elses life just a little bit easier, puts a smile on my face.

if there is anything else at all that jonib (@jonib, you chimed in so your included now) or i can help just post in the forums or send a PM to me

anything else you could use some help with??

K
If you like the work I have been doing then feel free to Image
fuqit2
Posts: 16
Joined: Sat May 14, 2016 6:49 pm

Re: Exctracting payload

Post by fuqit2 »

Well since you asked, :D any idea if show names can be used with this. ie "ncis" "O reilly factor" etc. and if the show name can take priority that would be the frosting on the cake!

next thing I'll tackle is the mi light, still waiting on the hardware
fuqit2
Posts: 16
Joined: Sat May 14, 2016 6:49 pm

Re: Exctracting payload

Post by fuqit2 »

just noticed this the original script was eg.result = eg.plugins.XBMC2.JSONRPC(u'Player.GetItem', u"["+str(PlayerID)+",['title']]", False) this gives me the show title and channel. your script [item][title] doesn't give show title. what's the difference between the two?
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Exctracting payload

Post by kgschlosser »

need you to copy and paste the event for me so that way i can read the whole payload to see if there is a key in there for the program title

the title is there you specified a specific want for the channel name and not the program title

so if the program title was in the event is is in the payload and i did preserve all that information with the new event that is triggered

so i just need that copy to identify the key
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Exctracting payload

Post by kgschlosser »

and would you like a separate event to be triggered for specific show titles like the one for the channels?

or do you just want the event for the channel to have the show title in it?
If you like the work I have been doing then feel free to Image
fuqit2
Posts: 16
Joined: Sat May 14, 2016 6:49 pm

Re: Exctracting payload

Post by fuqit2 »

here's what I get when I print eg.result
{u'item': {u'title': u'The Five', u'type': u'channel', u'id': 20, u'label': u'FNCHD/820'}}

separate events and I can tweak from that. THanks!!!
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Exctracting payload

Post by kgschlosser »

fuqit2 wrote:here's what I get when I print eg.result
{u'item': {u'title': u'The Five', u'type': u'channel', u'id': 20, u'label': u'FNCHD/820'}}

separate events and I can tweak from that. THanks!!!
i will work from that but an eg.result could be different than the payload

all ya have to do is right lick on the originating event and copy it.


that will copy the prefix suffix and payload all together
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Exctracting payload

Post by kgschlosser »

ok we have a slight mixup here

we are dealing with different events


in one picture you posted you show an event and it is for the channel and it's payload has in the key 'lable' and that is the channel name

another picture or example has an event and in the payload is 'title' for the name of the channel

and i am not running Kodi so i am not familiar with the data layout.

so what i need from you is.....

because it looks like you have an event for channel change and then another that is for when the actual show starts playing

the first only contains the channel data in the payload

the second has the channel data and the show data

but i do not know how these things are fired off
If you like the work I have been doing then feel free to Image
fuqit2
Posts: 16
Joined: Sat May 14, 2016 6:49 pm

Re: Exctracting payload

Post by fuqit2 »

the one when show plays, I found that from the xbmc2 thread. That thread is really hard to follow as it jumps all over the place. Your script picks up on the channel change. All are working and although it probably won't be the most efficient way of doing it, I can use both of these to get what I'm after.

I have limited knowledge with python and learn more each day and am very grateful for your help.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Exctracting payload

Post by kgschlosser »

the one that i am using is specifically using the channel change and there for doesn't have the title of the show located in that event

i will do a wildcard for the onplay and we can see how that works
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Exctracting payload

Post by kgschlosser »

will have to be in a little while tho i have to finish up this computer case i am building.

i need to get these computers back up and running
If you like the work I have been doing then feel free to Image
Post Reply