Support for XBMC2 plugin (formerly XBMCRepeat)

Questions and comments specific to a particular plugin should go here.
jonib
Plugin Developer
Posts: 1345
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Wed Jan 15, 2014 9:06 pm

The payload is in a Python dict variable.
leothlon wrote:XBMC2.Player.OnPlay.song {u'item': {u'album': u'The Storm', u'track': 4, u'title': u'Young Dad', u'artist': [u'HOFFMAESTRO']}, u'playlistid': 0, u'position': 3}
To get the "title" you do it like this: eg.event.payload["item"]["title"] and to get the artist: eg.event.payload["item"]["artist"][0]
also how as you see on the last one it gives \xe4 rather than ä.. how can i fix this?
This should work automatically when you extract the info correctly.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

jonib
Plugin Developer
Posts: 1345
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Fri Jan 17, 2014 3:39 pm

leothlon wrote:if i take json-rpc under experimental, set it to player - open
then i type " [{"file":"musicdb://3/spotify:playlist:1/"}] " in the field. any idea why that dont work?
Finally had a chance to look into this. I don't have/use spotify so can't test but testing another audio plugin "TWiT". I added a stream to favorites to easily get the url and it worked fine so I think you need to ask in XBMCs forum where somebody should know how to open a spotify url in JSON-RPC .

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

leothlon
Experienced User
Posts: 59
Joined: Tue Dec 17, 2013 6:29 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by leothlon » Fri Jan 17, 2014 4:17 pm

i've been able to get it running the spotify playlist with a workaround, its not pretty but it works atleast :/..

however i am still having issues understanding the xbmc json-rpc api.
if i want to get information for a tv episode with id 16888, what would i type in the parameterwindow?
i choose video libary - > get episode information. but then what?

or is it best to get the information from the http api?

what i want to do is get the ~5 newest episodes and display them on my contollunit, then i would click one of them and xbmc should start to play that episode.
so basicly i want to get name and number of the episode and what tvshow it belongs to.
then when i click the item it should send a play this id event to xbmc.

so if anyone can help me or explain how i use the json/http api that would be awsome.

jonib
Plugin Developer
Posts: 1345
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Fri Jan 17, 2014 5:12 pm

spencerthomass wrote:I have some 3d movies and I would love to have the projector automatically switch to the correct 3d format depending on which movie is played.
So I finally had a chance to look into this. Unfortunately I can't find a way to get any 3d info, there seems to be a "video\stereomode" property (tested december version of Gotham) but it's empty so might not be implemented yet.

So I think it's best for you to ask in the XBMC JSON-RPC forum if it's possible to get the 3D info, then I can help to use it in EventGhost.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

leothlon
Experienced User
Posts: 59
Joined: Tue Dec 17, 2013 6:29 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by leothlon » Fri Jan 17, 2014 6:05 pm

Also, how can i use a eventghost variable / event payload in the json rpc?
Lets say i send the movie id in eventghost event, then i use that payload in the json call to start playing that movie.

jonib
Plugin Developer
Posts: 1345
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Fri Jan 17, 2014 7:15 pm

leothlon wrote:i've been able to get it running the spotify playlist with a workaround, its not pretty but it works atleast :/..
Mind sharing with the class? :)
however i am still having issues understanding the xbmc json-rpc api.
if i want to get information for a tv episode with id 16888, what would i type in the parameterwindow?
i choose video libary - > get episode information. but then what?
VideoLibrary->GetEpisodeDetails with parameter:

Code: Select all

[16888,['title','tvshowid','file']]
will give you the title, tvshowid and filepath. this part ['title','tvshowid','file'] is a list of properties you want information about, here is the list of available properties (press the show link for the list), just add the ones you want.
or is it best to get the information from the http api?
The HTTP API is not available in newer versions of XBMC.
so if anyone can help me or explain how i use the json/http api that would be awsome.
If you want to learn JSON-RPC you kinda need to read the JSON-RPC spec here then try to understand XBMCs API here, and read the XBMC JSON-RPC forum here. It's kinda much to learn depending on your skill level.
If you want to learn specific commands you want to use, just ask here and I'll try to help as much as I can. It just might take a while for me to reply sometimes.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

jonib
Plugin Developer
Posts: 1345
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Fri Jan 17, 2014 7:34 pm

leothlon wrote:Also, how can i use a eventghost variable / event payload in the json rpc?
Normally you use single curly braces {}, but as JSON-RPC uses curly braces in the parameters, I had to do a hack so you need double like this:

Code: Select all

{{eg.event.payload['item']['id']}}
Lets say i send the movie id in eventghost event, then i use that payload in the json call to start playing that movie.
Player->Open with parameter:

Code: Select all

[{"movieid":{{eg.event.payload['item']['movieid']}} }]
jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

leothlon
Experienced User
Posts: 59
Joined: Tue Dec 17, 2013 6:29 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by leothlon » Sat Jan 18, 2014 1:26 pm

jonib wrote:
leothlon wrote:i've been able to get it running the spotify playlist with a workaround, its not pretty but it works atleast :/..
Mind sharing with the class? :)
i used gui->activatewindow with:
{ "window": "music", "parameters": ["musicdb://3/spotify:playlist:1/" ] }
then just xmbc down action followed by xbmc play action.
So yea not verry "clean" but it works atleast.
jonib wrote:
leothlon wrote:so if anyone can help me or explain how i use the json/http api that would be awsome.
If you want to learn JSON-RPC you kinda need to read the JSON-RPC spec here then try to understand XBMCs API here, and read the XBMC JSON-RPC forum here. It's kinda much to learn depending on your skill level.
If you want to learn specific commands you want to use, just ask here and I'll try to help as much as I can. It just might take a while for me to reply sometimes.

jonib
I am not new to coding, its just i have always coded in .net so python is abit new for me. and i am not verry used to json. but i am starting to understand how the xbmc json-rpc works now. ones i start to understand the basics i am fast learner so with the help you've given me and those forum links i think i can figure it out.

thanks for all the help.

nonob
Experienced User
Posts: 76
Joined: Tue Dec 06, 2011 6:52 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by nonob » Tue Jan 28, 2014 9:52 am

Hello,

Is there anybody that use xbmc minimized and working fine ?

I often use the "minimize" action to listen to music while playing video games on others applications and sometimes xbmc.exe crash.
If i start a music partymode when xbmc is minimized, it crash every time.

I posted on the xbmc forum but no reply :

http://forum.xbmc.org/showthread.php?tid=184018

I posted to a french forum and a xbmc addon develloper say me that it is a xbmc "bug" and nobody seems to have a solution.

So i ask to you: do you have this problem and/or do you know a fix ?

thanks

jonib
Plugin Developer
Posts: 1345
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Tue Jan 28, 2014 6:34 pm

nonob wrote:Is there anybody that use xbmc minimized and working fine ?
I don't use XBMC minimized so don't have any experience with that.

As you haven't gotten any reply from the XBMC forum, maybe you need to make a bug report in their bug tracker.
Have you read these threads? XBMC Crashing In Minimised background state with LoadLibrary"DBGHELP.DLL" Error and Crash / Freeze When Minimized.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

ijourneaux
Experienced User
Posts: 102
Joined: Wed Feb 17, 2010 2:20 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by ijourneaux » Tue Jan 28, 2014 8:52 pm

I am trying to configure EventGhost so I can use the PVR functionality in XMBC. I have browsed through the XBMC2 tree a couple of times but can't seem to locate the PVR related functions,

Perhaps I am just missing something obvious.

Ian

jonib
Plugin Developer
Posts: 1345
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Tue Jan 28, 2014 9:15 pm

ijourneaux wrote:I am trying to configure EventGhost so I can use the PVR functionality in XMBC. I have browsed through the XBMC2 tree a couple of times but can't seem to locate the PVR related functions,
Unfortunately I have not added any new actions in a while including the PVR ones.
Right now you can use the PVR support via JSON-RPC, if you are using a recent test version.
You could add the missing actions from here by editing the XBMCRepeat\__init__.py plugin file.

I will add the missing actions (and everything else missing) but I don't know when. I'm hoping before the final version of the next XBMC (Gotham).

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

nonob
Experienced User
Posts: 76
Joined: Tue Dec 06, 2011 6:52 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by nonob » Wed Jan 29, 2014 6:53 am

As you haven't gotten any reply from the XBMC forum, maybe you need to make a bug report in their bug tracker.
Have you read these threads? XBMC Crashing In Minimised background state with LoadLibrary"DBGHELP.DLL" Error and Crash / Freeze When Minimized.
Yes, the first isn't the same issue, and i replied to the second.
It seems that XBMC doesn't like running minimized.I give up, i will use another app to listen to my music.

Thanks

Jefman
Posts: 4
Joined: Tue Nov 26, 2013 1:09 pm

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Jefman » Fri Jan 31, 2014 10:11 am

Hi and thanks for a really great plugin !

I seem to miss a feature that use alot with my remote:

<button id="8">RunScript(script.xbmc.subtitles)</button>

Can I simulate this button ? Or send the RunScript command in any way ?

Thanks !

jonib
Plugin Developer
Posts: 1345
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Fri Jan 31, 2014 1:14 pm

Jefman wrote:Hi and thanks for a really great plugin !
8)
I seem to miss a feature that use alot with my remote:

<button id="8">RunScript(script.xbmc.subtitles)</button>

Can I simulate this button ? Or send the RunScript command in any way ?
You need to use a recent test version of the plugin, then you can add a Experimental\JSON-RPC action with these settings: Namespace: Addons, Method: ExecuteAddon and parameter: ['script.xbmc.subtitles'].

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

Post Reply