Trying to get the call:
Code: Select all
JSON-RPC->Player->GetActivePlayers->(No parameters)Anyone has it working in Gotham?
Code: Select all
JSON-RPC->Player->GetActivePlayers->(No parameters)Something seems to work differently as an empty parameter don't seem to work at the moment.gechu wrote:Trying to get the call:
Code: Select all
{}Code: Select all
[]Code: Select all
[]Great.gechu wrote:This worked:Code: Select all
[]
Nice, I was getting a bit hungry.BTW, I┬┤m buying you a beer + pizza for the great work you put into this plugin! Thank you!
Code: Select all
{ "playerid":{{eg.result[0]["playerid"]}}, "properties": ["speed"]}Code: Select all
08:23:17 Traceback (most recent call last) (1640):
08:23:17 File "C:\Program Files Portable\EventGhost\eg\Classes\TaskletDialog.py", line 59, in ProcessingTask
08:23:17 self.Configure(*args, **kwargs)
08:23:17 File "C:\Program Files Portable\EventGhost\eg\Classes\ConfigDialog.py", line 165, in Configure
08:23:17 treeItem.Configure(*args)
08:23:17 File "C:\Program Files Portable\EventGhost\eg\Classes\ActionItem.py", line 101, in Configure
08:23:17 return self.executable.Configure(*args)
08:23:17 File "C:\Program Files Portable\EventGhost\plugins\XBMCRepeat\__init__.py", line 1144, in Configure
08:23:17 if 'jsonrpc' in json.loads(textControl2.GetValue()):
08:23:17 File "json\__init__.pyc", line 307, in loads
08:23:17 File "json\decoder.pyc", line 319, in decode
08:23:17 File "json\decoder.pyc", line 336, in raw_decode
08:23:17 File "json\scanner.pyc", line 55, in iterscan
08:23:17 File "json\decoder.pyc", line 183, in JSONObject
08:23:17 File "json\scanner.pyc", line 55, in iterscan
08:23:17 File "json\decoder.pyc", line 171, in JSONObject
08:23:17 ValueError: Expecting property name: line 1 column 14 (char 14)
Try this:gechu wrote:The dynamic part isn┬┤t correcly evaluated to the value received in the previous call to "Player.GetActivePlayers".
Code: Select all
{{eg.result[0]['playerid']}},['speed']Code: Select all
Error in Action: "XBMC2: GetCurrentlyPlayingFilename"
Traceback (most recent call last) (1640):
File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 170, in CallWrapper
return self(*args)
File "C:\Program Files (x86)\EventGhost\plugins\XBMCRepeat\__init__.py", line 690, in __call__
responce = self.plugin.JSON_RPC.send('Player.GetActivePlayers')
File "C:\Program Files (x86)\EventGhost\plugins\XBMCRepeat\__init__.py", line 681, in send
return json.loads(responce)
File "json\__init__.pyc", line 307, in loads
File "json\decoder.pyc", line 319, in decode
File "json\decoder.pyc", line 338, in raw_decode
ValueError: No JSON object could be decodedIt hasn't worked for a while I will probably remove it in the next release. You will need to use the JSON-RPC actions to get the filename.Pliind wrote:I've got basicly everything working in the plugin except for "get current playing filename"
Yeah i did a bit of back-tracking in the thread, so Iv'e also updated my plugin.jonib wrote:I hasn't worked for a while I will probably remove it in the next release. You will need to use the JSON-RPC actions to get the filename.Pliind wrote:I've got basicly everything working in the plugin except for "get current playing filename"
jonib
Code: Select all
PlayerID = eg.plugins.XBMC2.JSONRPC(u'Player.GetActivePlayers', u'', False)[0]['playerid']
eg.result = eg.plugins.XBMC2.JSONRPC(u'Player.GetItem', u"["+str(PlayerID)+",['title']]", False)Code: Select all
{u'item': {u'title': u'', u'type': u'unknown', u'label': u'filename.mp4'}}Code: Select all
PlayerID = eg.plugins.XBMC2.JSONRPC(u'Player.GetActivePlayers', u'', False)[0]['playerid']
eg.result = eg.plugins.XBMC2.JSONRPC(u'Player.GetItem', u"["+str(PlayerID)+",['title']]", False)
print eg.result
b = str(eg.result)
b = b.split(" ",6)
playing=b[6]
eg.globals.playing = playing
print eg.globals.playing
c = str(eg.globals.playing)
c = c.split("'",10)
title=c[3]
eg.globals.title = title
print eg.globals.title
d = str(eg.globals.title)
d = d.split(".")
show=d[0]
eg.globals.show = show
print eg.globals.showI'm having big PC related problems at the moment so can't do any real development/debugging, I don't even get e-mails correctly.MikeD82 wrote:Need some help running the following Json url command in the plugin.
http://192.168.1.20:8080/jsonrpc?reques ... sume":true}}}
I can get the file to play by running:
JSONRPC Namespace:Player Method:Open
[{"file":"{{eg.globals.playing}}"}]
eg.globals.playing=file path
That starts the video at the beginning. I would like to resume the video or atleast ask me if I would like to resume the movie.
Any ideas?
Code: Select all
[{"file":"{{eg.globals.playing}}","options":{"resume":true}}]Very sorry for the late reply.steve1977 wrote:I'll be making another attempt to use and configure the remote. What would be the latest version? Is the one included in the June version of EG the latest? Thanks in advance!