Page 67 of 94

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Sat Nov 01, 2014 12:48 am
by jonib
Derbyboy wrote:Hi,

Why do I not have any options here:
You need to press the "Update" button while XBMC(Kodi) is running to get the JSON-RPC methods that are supported.

I'll make it do it the first time automatically at some point.

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Sat Nov 01, 2014 10:30 am
by Derbyboy
Thank you Jonib, it worked!

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Sat Nov 01, 2014 11:03 am
by Derbyboy
Hi again :(

Could you help me with whis one as well?

I┬┤m trying to run the scan video library Json.

Thanks

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Sat Nov 01, 2014 4:26 pm
by jonib
Derbyboy wrote:Could you help me with whis one as well?
Sure, but the next time (if you didn't do it) read a couple of pages back before asking and you might find a solution. :)
I┬┤m trying to run the scan video library Json.
Do this that I posted before. It's a known problem I haven't fixed yet (as I forgot about it the last time I updated the plugin :oops: )

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Mon Nov 17, 2014 3:33 pm
by builderjer
I am trying to use JSON to get which window is open in XBMC. I guess I have no idea on how to achieve that.

I try the GetProperties, but don't understand what parameters to use. Any help would be great.

XBMC - Gotham
OS - Windows 7

Thank you

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Mon Nov 17, 2014 5:30 pm
by jonib
builderjer wrote:I am trying to use JSON to get which window is open in XBMC. I guess I have no idea on how to achieve that.
Interestingly (and lucky you :) ) I've been looking into how to find out where the user is and what the user is doing in XBMC(Kodi).

You were in the right track with GetProperties. Specifically you need to use a JSONRPC action with Namespace:"GUI" and Method:"GetProperties" parameter: [["currentwindow"]]

You can access the results with eg.result["currentwindow"]["id"] or eg.result["currentwindow"]["label"].

You might need to use JSONRPC XBMC.GetInfoLabels to get more information. If I know more specific what you want to do I can help more.

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Mon Nov 17, 2014 7:53 pm
by builderjer
Thank you for the quick response. That worked perfect. I'm new to eventghost, but really enjoy the possibilities of it. I'm sure I will be posting more as I go

Thank you again

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Wed Nov 19, 2014 3:01 pm
by builderjer
OK, so I have another question. I am trying to learn to use JSON to notify me of when media is playing. I want to use the Player.OnPlay method, but it doesn't seem to be available in the options provided. Is there a way that I can code this into a python script to achieve this?

I guess what I'm trying to do is receive the raw event sent from XBMC and process that with an action.

For example:

When a video is selected to play and starts, I want EventGhost to process that and ExclusiveEnable a specific folder.
When the video stops, I want it to ExclusiveEnable a different folder.

Any ideas on how I can accomplish this?

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Wed Nov 19, 2014 3:14 pm
by jonib
builderjer wrote:OK, so I have another question.
Cool
I am trying to learn to use JSON to notify me of when media is playing.
Nice
I want to use the Player.OnPlay method, but it doesn't seem to be available in the options provided. Is there a way that I can code this into a python script to achieve this?
That's a notification (event) and you just need to activate "JSON-RPC notifications" in XBMC2s settings. You also need to activate UPnP in XBMC(Kodi). After that you would get all events from XBMC and you can do whatever you want with them. :lol:

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Wed Nov 19, 2014 3:16 pm
by builderjer
I am receiving all of these notifications in my log, I just don't know how to use them.

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Wed Nov 19, 2014 3:21 pm
by jonib
builderjer wrote:I am receiving all of these notifications in my log, I just don't know how to use them.
Just drag a event to a macro you want it to activate, you can access the information in the event with "eg.event.payload".

edit: example to extract some info.

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Wed Nov 19, 2014 3:31 pm
by builderjer
This is my log. It only shows it as a notification, not an event.
Capture.PNG

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Wed Nov 19, 2014 3:35 pm
by jonib
builderjer wrote:This is my log. It only shows it as a notification, not an event.
Those are "Raw" events just used for debugging, so you should turn that off. You need to disable the "Log only assigned and activated events" to see all events.

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Wed Nov 19, 2014 7:27 pm
by builderjer
Got it!!! Thank you!!

I did have to leave the "Raw Events" checked, otherwise it didn't show the events from them.

Now it's more playing, going window to window and see the action.

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Thu Nov 20, 2014 6:15 am
by jonib
builderjer wrote:Got it!!! Thank you!!
Great
I did have to leave the "Raw Events" checked, otherwise it didn't show the events from them.
That would be a bug then, mind posting a new screenshot of the log with RAW events and normal events? I'll check on my system too a bit later with Gotham and Helix

jonib